Ignore SIGPIPE when we've opened a pipe

This commit is contained in:
Guido van Rossum 1991-07-27 21:41:01 +00:00
parent 278ef59110
commit e0d452d5ef
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}