From 1cf3a1c4c9bc01b47cd90a64a8024fc0d661790d Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Wed, 30 Dec 2009 21:12:31 +0100 Subject: [PATCH] Debian bug 531078: socat execs children with SIGCHLD ignored - fixed --- CHANGES | 4 ++++ VERSION | 2 +- xio-progcall.c | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 8ce1617..0268c05 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +corrections: + Debian bug 531078: socat execs children with SIGCHLD ignored; corrected + to default. Thanks to Martin Dorey for reporting this bug. + ####################### V 1.7.1.1: corrections: diff --git a/VERSION b/VERSION index 4026ae1..f1bec68 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -"1.7.1.1" +"1.7.1.1+subsigchld" diff --git a/xio-progcall.c b/xio-progcall.c index 281039d..a544abd 100644 --- a/xio-progcall.c +++ b/xio-progcall.c @@ -414,8 +414,10 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */ 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)); } #if HAVE_PTY