[PATCH] libc: fix signal handling in system()

Richard Braun rbraun at sceen.net
Fri Jan 20 12:57:28 UTC 2012


On Tue, Jan 17, 2012 at 10:33:10AM +0100, Richard Braun wrote:
> When built without NPTL support (or for a sparc target), the system()
> function doesn't conform to its specification. Namely, it uses signal()
> to install/save/restore signal handlers, which may break applications
> using custom handlers installed with sigaction(). In addition, it resets
> the SIGCHLD handler to SIG_DFL instead of blocking the signal, which may
> result in "lost" signals if a custom handler was installed.
> 
> Fix system() by replacing uses of signal() with appropriate calls to
> sigaction() and sigprocmask().
> 
> Signed-off-by: Richard Braun <rbraun at sceen.net>

Quick reminder to apply this patch, as the thread has now been quiet
for a few days.

-- 
Richard Braun


More information about the uClibc mailing list