[PATCH] daemon: ignore SIGHUP

Mike Frysinger vapier at gentoo.org
Wed Nov 16 19:56:05 UTC 2011


On Wednesday 16 November 2011 14:38:17 Bernhard Reutner-Fischer wrote:
> even with MMU (and only ignore HUP on !MMU to re-unify them).
> +~98b

i'm not sure about this.  you're introducing a race condition: if someone 
sends a signal and it happens to be delivered right after the clone(), then 
the child will have its signal handler called and utilize the stack.

although i wonder why you're making this change.  glibc doesn't seem to ignore 
SIGHUP when forking.

> -static inline attribute_optimize("O3")
> -pid_t _fork_parent(void)
> +static __always_inline
> +pid_t fork_parent(void)
>  {

dropping of the -O3 is probably bad.  this is to try and make sure there is no 
stack usage even when people build with debug flags.  if the cloned child tries 
to scribble on the stack, everything blows up.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20111116/a30348f3/attachment.asc>


More information about the uClibc mailing list