Debian bug 531078: socat execs children with SIGCHLD ignored - fixed

This commit is contained in:
Gerhard Rieger 2012-07-21 15:39:09 +02:00
parent 6dc9f3fff7
commit 0c8f8a7fc0
2 changed files with 8 additions and 3 deletions

View file

@ -12,6 +12,9 @@ corrections:
fixed a compile problem caused by size_t/socklen_t mismatch on 64bit
systems
Debian bug 531078: socat execs children with SIGCHLD ignored; corrected
to default. Thanks to Martin Dorey for reporting this bug.
docu mentions option so-bindtodev but correct name is so-bindtodevice.
Thanks to Jim Zimmerman for reporting.

View file

@ -1,5 +1,5 @@
/* source: xio-progcall.c */
/* Copyright Gerhard Rieger 2001-2009 */
/* Copyright Gerhard Rieger 2001-2012 */
/* Published under the GNU General Public License V.2, see file COPYING */
/* this file contains common code dealing with program calls (exec, system) */
@ -643,8 +643,10 @@ Warn1("xio-progcall.c: fd->howtoshut == %d", fd->howtoshut);
gid_t group;
if (withfork) {
if (Signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
Warn1("signal(SIGCHLD, SIG_IGN): %s", strerror(errno));
/* The child should have default handling for SIGCHLD. */
/* In particular, it's not defined whether ignoring SIGCHLD is inheritable. */
if (Signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
Warn1("signal(SIGCHLD, SIG_DFL): %s", strerror(errno));
}
/* dup2() the fds to desired values, close old fds, and apply late