Jonathan Oddy
f2dccb90e8
Restore SIGPIPE handler to DFL on POpen
...
Python sets the SIGPIPE handler to SIG_IGN. On execv() signal handlers are
reset to their defaults, EXCEPT those that are SIG_IGN which are left ignored.
In Python 3 subprocess.popen explicitly resets the SIGPIPE handler to SIG_DFL,
but unfortunately in Python 2.7 it does not. This leads to subprocesses being
executed with SIGPIPE ignored. This is often a problem with bash scripts which
rely on SIGPIPE to terminate commands in a pipe, but can easily be a problem
with other applications.
This implements the Python 3 behaviour for Python 2.7 by using a preexec_fn.
2018-10-12 12:31:24 -07:00
..
2018-09-10 15:05:52 -05:00
2018-08-31 16:27:32 -05:00
2018-10-01 11:06:14 -05:00
2018-09-30 12:03:53 +01:00
2018-09-04 11:14:22 -04:00
2018-09-28 08:33:38 +01:00
2018-09-19 10:53:16 -05:00
2018-10-06 08:50:12 -05:00
2018-10-08 08:23:23 +01:00
2018-10-08 08:41:15 +01:00
2018-10-08 10:53:24 +01:00
2018-10-08 10:11:03 +01:00
2018-10-10 12:14:47 +02:00
2018-08-31 22:20:56 +02:00
2018-09-14 11:16:13 -05:00
2018-09-24 14:33:19 -05:00
2018-10-12 11:06:40 -04:00
2018-09-20 19:37:54 +10:00
2018-09-21 16:23:21 -07:00
2018-09-28 16:04:50 -04:00
2018-09-20 12:31:48 -05:00
2018-10-11 08:18:44 -07:00
2018-09-18 09:05:20 -05:00
2018-09-20 12:13:17 -04:00
2018-09-24 10:40:05 +01:00
2018-10-06 08:50:31 -05:00
2018-09-25 16:42:12 -04:00
2018-09-17 14:31:41 -04:00
2018-09-05 12:50:03 -04:00
2018-09-18 15:33:19 -04:00
2018-09-27 23:11:04 -04:00
2018-09-11 12:47:29 -04:00
2018-09-11 13:56:13 -05:00
2018-10-12 11:27:29 -04:00
2018-10-03 17:27:34 -04:00
2018-09-07 10:16:03 -05:00
2018-10-03 13:58:55 -04:00
2018-09-19 08:44:05 -07:00
2018-09-13 15:38:52 -04:00
2018-10-12 10:43:09 -05:00
2018-09-21 12:33:24 -04:00
2018-09-13 13:53:36 -05:00
2018-09-24 14:34:59 -05:00
2018-10-08 14:56:40 -04:00
2018-09-28 16:07:44 -04:00
2018-09-28 12:51:17 -04:00
2018-10-12 12:31:24 -07:00
2018-09-14 16:07:11 -04:00
2018-09-10 14:37:18 -05:00
2018-10-07 16:03:48 -04:00
2018-10-11 13:41:06 -04:00
2018-09-07 13:41:09 -04:00
2018-10-04 15:29:57 -04:00
2018-08-31 11:11:13 -07:00
2018-09-21 15:31:12 +10:00
2018-09-11 13:07:43 +10:00
2018-10-08 16:28:28 +10:00
2018-09-11 08:23:46 +10:00
2018-09-11 14:22:57 +10:00
2018-09-13 08:50:13 +10:00
2018-09-11 14:23:48 +10:00
2018-10-02 15:55:53 -07:00
2018-09-25 09:21:22 +10:00
2018-10-08 08:39:49 -04:00