diff --git a/CHANGES b/CHANGES index 2b23ad0..6d27ccd 100644 --- a/CHANGES +++ b/CHANGES @@ -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. diff --git a/xio-progcall.c b/xio-progcall.c index 2cffb01..11cfb51 100644 --- a/xio-progcall.c +++ b/xio-progcall.c @@ -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