reboot.c

main
iinitt/reboot.c history · blame · raw

14 lines · 301 bytes

 1// Ilkay Alakay <ilkayxda@aol.com>. Published under The Unlicense
 2#include <stdio.h>
 3#include <signal.h>
 4#include <unistd.h>
 5
 6int main() {
 7    if (geteuid() != 0) {
 8        fprintf(stderr, "iinitt: please run this program as root\n");
 9        return 1;
10    }
11    
12    kill(1, SIGINT);
13    return 0;
14}