diff options
author | Nick Shipp <nick@shipp.ninja> | 2017-01-18 05:17:11 -0500 |
---|---|---|
committer | Nick Shipp <nick@shipp.ninja> | 2017-01-18 05:17:11 -0500 |
commit | a68a69b3fab1f2f35be22940f6151db90a8b8cc4 (patch) | |
tree | b57297fd139c2c9541ed9878db78ba95959bfaa7 /poweroff.c | |
parent | 731f65fc82afcd474f4c682f9f0069e5c80c86dd (diff) |
Major nshp rewrite
Diffstat (limited to 'poweroff.c')
-rw-r--r-- | poweroff.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/poweroff.c b/poweroff.c new file mode 100644 index 0000000..5379c4f --- /dev/null +++ b/poweroff.c @@ -0,0 +1,15 @@ +#include <sys/types.h> +#include <stdio.h> +#include <errno.h> +#include <signal.h> + +int +main(void) +{ + if (kill(1, SIGUSR1) == -1) { + perror("kill"); + return errno; + } + + return 0; +} |