[ale] Restart

Stuffed Crust pizza at shaftnet.org
Mon Jan 15 14:17:30 EST 2001


On Mon, Jan 15, 2001 at 11:57:43AM -0500, Chris Fowler wrote:
> I want to restart a Linux device in a c program.  Is there a system call I
> can use to tell the kernel to restart the machine immediately.  I do not
> need to unmount, I do not need to stop programs.  I want to tell the kernel
> to restart immediately.

#include <sys/reboot.h>

and then you can do things like:

reboot(RB_HALT_SYSTEM);
reboot(RB_POWER_OFF);
reboot(RB_AUTOBOOT);
...etc

 - Pizza
-- 
Solomon Peachy                                    pizzaATfucktheusers.org
I ain't broke, but I'm badly bent.                           ICQ# 1318344
Patience comes to those who wait.
    ...It's not "Beanbag Love", it's a "Transanimate Relationship"...
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list