Explicitly reset the SIGPIPE handler in child processes

Fixes #1253
This commit is contained in:
Kovid Goyal 2018-12-20 09:06:21 +05:30
parent a97c440872
commit 056c2c12bb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -115,6 +115,7 @@ spawn(PyObject *self UNUSED, PyObject *args) {
for (int c = 3; c < 201; c++) close(c);
environ = env;
signal(SIGPIPE, SIG_DFL);
execvp(exe, argv);
// Report the failure and exec a shell instead, so that we are not left
// with a forked but not exec'ed process