From: Guido van Rossum Date: Sat, 27 Jul 1991 21:41:01 +0000 (+0000) Subject: Ignore SIGPIPE when we've opened a pipe X-Git-Tag: v0.9.8~860 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0d452d5efe511274754589c247a2a3952fbac87;p=thirdparty%2FPython%2Fcpython.git Ignore SIGPIPE when we've opened a pipe --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7645bfda3fc5..204918be4982 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); }