Commit e0d452d5 authored by Guido van Rossum's avatar Guido van Rossum

Ignore SIGPIPE when we've opened a pipe

parent 278ef591
...@@ -571,6 +571,9 @@ posix_popen(self, args) ...@@ -571,6 +571,9 @@ posix_popen(self, args)
fp = popen(getstringvalue(name), getstringvalue(mode)); fp = popen(getstringvalue(name), getstringvalue(mode));
if (fp == NULL) if (fp == NULL)
return posix_error(); 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); return newopenfileobject(fp, name, mode, pclose);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment