problem with running "kill -QUIT 1" from init

Denys Vlasenko vda.linux at googlemail.com
Wed Jan 28 23:54:33 UTC 2009


On Wednesday 28 January 2009 06:33, Rob Landley wrote:
> A quick glance at the code showed things like:
> 
> #if ENABLE_FEATURE_USE_INITTAB
>     signal(SIGHUP, reload_signal);
> #else
>     signal(SIGHUP, SIG_IGN);
> #endif

I reviewed the code and found two intances of code I can simplify a bit.

> When the whole point of ENABLE macros (defined to 0 or 1) is so you can 
> instead use code like:
> 
>   if (ENABLE_FEATURE_USE_INITTAB) signal(SIGHUP, reload_signal);
>   else signal(SIGHUP, SIG_IGN);
> 
> Or even:
> 
>   signal(SIGHUP, ENABLE_FEATURE_USE_INITTAB ? reload_signal : SIG_IGN);

But then I need to add this:

 }
+#else
+void reload_signal(int sig);
 #endif

Anyway. Please review attached patch.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.patch
Type: text/x-diff
Size: 1160 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20090129/63d62602/attachment.bin 


More information about the busybox mailing list