Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reboot or power down from a program 1

Status
Not open for further replies.

CaKiwi

Programmer
Apr 8, 2001
1,294
US
Can anyone tell me how to reboot or powerdown the system from a C program. I am running Mandrake 8.1 on a PC. CaKiwi
 
you can use system() to execute shutdown program. or grab the source for shutdown and look into it.
for powerdown (no just reboot) you must have a support in kernel.
bubo
 
Thanks bubak, that should work fine. I have to get used to the open source world where I can look at the source of any program to find out how it works. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top