diff options
author | sin <sin@2f30.org> | 2015-02-18 17:55:27 +0000 |
---|---|---|
committer | sin <sin@2f30.org> | 2015-02-18 17:56:17 +0000 |
commit | 15a22edf7c1f2e5b7ac0863f6e20b474a14d9de8 (patch) | |
tree | 614621069df4e61a57d96345b872a6c1c4d98d93 | |
parent | 634d0168a6ea43e3c337d36e0526f39f9002daa1 (diff) |
Prefix signal handlers with 'sig'
Apparently reboot() is an existing symbol on some BSD systems.
-rw-r--r-- | sinit.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -9,18 +9,18 @@ #define LEN(x) (sizeof (x) / sizeof *(x)) -static void poweroff(void); -static void reap(void); -static void reboot(void); +static void sigpoweroff(void); +static void sigreap(void); +static void sigreboot(void); static void spawn(char *const []); static struct { int sig; void (*handler)(void); } sigmap[] = { - { SIGUSR1, poweroff }, - { SIGCHLD, reap }, - { SIGINT, reboot }, + { SIGUSR1, sigpoweroff }, + { SIGCHLD, sigreap }, + { SIGINT, sigreboot }, }; #include "config.h" @@ -53,20 +53,20 @@ main(void) } static void -poweroff(void) +sigpoweroff(void) { spawn(rcpoweroffcmd); } static void -reap(void) +sigreap(void) { while (waitpid(-1, NULL, WNOHANG) > 0) ; } static void -reboot(void) +sigreboot(void) { spawn(rcrebootcmd); } |