[OT] poll() vs. AIO

Laurent Bercot ska-dietlibc at skarnet.org
Mon Aug 22 07:55:53 UTC 2011


> Just to note that POSIX does specify sigaction().
> 
> Signal handler set using this will get additional siginfo_t structure
> where you get all that info for SIGCHLD: child's PID, uid, exit code, etc.

 Not all systems support realtime signals though (which are the ones with
a payload in the siginfo_t structure).


> You can also specify SA_NOCLDWAIT so the child is never turned to zombie
> (but you still get the signal with the details), and call to waitpid()
> is not needed.

 Which opens up a race condition: a pid does not identify a unique
process anymore. Until we get to 64-bit pids, SA_NOCLDWAIT should
basically never be used.

-- 
 Laurent


More information about the busybox mailing list