Is there any system shutdown code in C From DOS ?

M

Mark A. Odell

(e-mail address removed) (Sweety) wrote in

plz i need the code?
^^^^^
Please I

There is no such thing as shutdown or DOS in C. You seek an msdos
programming newsgroup or some comp.sources newsgroup maybe.
 
M

Mark A. Odell

(e-mail address removed) (Michael Scarlett) wrote in

system(cmd);

Not portable in the sense that it may do nothing on an ISO C compliant
implementation, like say an embedded system.
 
D

Dan Pop

In said:
(e-mail address removed) (Michael Scarlett) wrote in



Not portable in the sense that it may do nothing on an ISO C compliant
implementation, like say an embedded system.
^^^^^^^^^^^^^^^^^^
Bogus argument: freestanding implementations need not support any of the
standard C library. Your objection to system() is equally valid to
strlen() or malloc() on a freestanding implementation.

The *right* objection to system() is that its argument is highly platform
specific. Then again, this is equally true for fopen's first argument ;-)

Dan
 
D

Dan Pop

In said:
(e-mail address removed) (Dan Pop) wrote in

This may also work for other systems as newer machines have a soft power
button that actually shuts down gracefully.

There is more than one way of switching the power off ;-)

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top