mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Ignore SIGPIPE when we've opened a pipe
This commit is contained in:
parent
278ef59110
commit
e0d452d5ef
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue