summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-07-27 21:41:01 (GMT)
committerGuido van Rossum <guido@python.org>1991-07-27 21:41:01 (GMT)
commite0d452d5efe511274754589c247a2a3952fbac87 (patch)
treeb1291cdcdd3fc6db4fb3edd839412e181a13dd2c /Modules
parent278ef591107ef670d164d070d2c42e30bc903d57 (diff)
downloadcpython-e0d452d5efe511274754589c247a2a3952fbac87.zip
cpython-e0d452d5efe511274754589c247a2a3952fbac87.tar.gz
cpython-e0d452d5efe511274754589c247a2a3952fbac87.tar.bz2
Ignore SIGPIPE when we've opened a pipe
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7645bfd..204918b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -571,6 +571,9 @@ posix_popen(self, args)
fp = popen(getstringvalue(name), getstringvalue(mode));
if (fp == NULL)
return posix_error();
+ /* From now on, ignore SIGPIPE and let the error checking
+ do the work. */
+ (void) signal(SIGPIPE, SIG_IGN);
return newopenfileobject(fp, name, mode, pclose);
}