www.nico.schottelius.org/software/cinit/browse_source/cinit-0.3pre10/src/client/poweroff.kill.c
Nico Schottelius 423ba10303 import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-09-16 12:53:45 +02:00

24 lines
554 B
C

/***********************************************************************
*
* 2007 Nico Schottelius (nico-cinit at schottelius.org)
*
* part of cLinux/cinit
*
* Reboot the system through a kill call
*/
#include <signal.h> /* kill() */
#include "messages.h" /* MSG_* */
#include "cinit.h" /* print_errno() */
#include "signals.h" /* signals mapping */
int main()
{
if(kill(1,SIG_CINIT_POWEROFF) == -1) {
print_errno(MSG_POWEROFF_KILL);
return 1;
}
return 0;
}