[PATCH trivial] do not fail build if SIGPWR is not defined
Apparently, some *BSD variants (and maybe some other OSes) does not define SIGPWR signal. So since commit 760fc6debcba8c, busybox fails to build on such platforms. Fix this. Signed-off-By: Michael Tokarev diff --git a/init/init.c b/init/init.c index d29328c..992a21e 100644 --- a/init/init.c +++ b/init/init.c @@ -1135,7 +1137,9 @@ int init_main(int argc UNUSED_PARAM, char **argv) struct sigaction sa; bb_signals(0 +#ifdef SIGPWR + (1 << SIGPWR) /* halt */ +#endif + (1 << SIGUSR1) /* halt */ + (1 << SIGTERM) /* reboot */ + (1 << SIGUSR2) /* poweroff */ ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH trivial] do not fail build if SIGPWR is not defined
Hi Michael ! >Apparently, some *BSD variants (and maybe some other OSes) does >not define SIGPWR signal. So since commit 760fc6debcba8c, >busybox fails to build on such platforms. Fix this. >+#ifdef SIGPWR > + (1 << SIGPWR) /* halt */ >+#endif > + (1 << SIGUSR1) /* halt */ Does this change the signal send to do system halt? If so, this may break several scripts which require a specific usage of signals. -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH trivial] do not fail build if SIGPWR is not defined
29.01.2014 12:51, Harald Becker пишет: > Hi Michael ! > >> Apparently, some *BSD variants (and maybe some other OSes) does >> not define SIGPWR signal. So since commit 760fc6debcba8c, >> busybox fails to build on such platforms. Fix this. > >> +#ifdef SIGPWR >> + (1 << SIGPWR) /* halt */ >> +#endif >> + (1 << SIGUSR1) /* halt */ > > Does this change the signal send to do system halt? If so, this I'm not sure I follow what you're asking. This is a bitmask of signals which needs to be catched by init. It is not a set of signals _sent_ by init, it is a set of signals _intercepted_ by init. This can't actually change anything (except of re-enabling building this code on platforms which don't have SIGPWR), because if the signal isn't defined, it doesn't exist and can't be used anyway. > may break several scripts which require a specific usage of > signals. Which scripts send signals to init? Which process is actually _able_ to send any signal to init on linux? Really I'm not sure I understand what you're talking about. Thanks, /mjt ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox