import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
/***********************************************************************
|
||||
*
|
||||
* 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 "intern.h" /* print_errno() */
|
||||
#include "signals.h" /* signals mapping */
|
||||
|
||||
int main()
|
||||
{
|
||||
if(kill(1,SIG_CINIT_REBOOT) == -1) {
|
||||
print_errno(MSG_REBOOT_KILL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue