run-report: Restore SIGPIPE default handler in subprocess calls
authorChristian Babeux <christian.babeux@efficios.com>
Tue, 18 Dec 2012 21:31:15 +0000 (16:31 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 18 Dec 2012 21:47:58 +0000 (16:47 -0500)
commit4ed5c01eca0a952825962abfc405ba01bba9b52c
treeb7e72d5159ee5915672f38c44029b1493e3db293
parent7c0a523d3259f02d3c984f9a19533d88c7079712
run-report: Restore SIGPIPE default handler in subprocess calls

Python override the SIGPIPE default handler because it prefers to check
every write and raise an IOError exception rather than taking SIGPIPE
[1].

This behavior has the unfortunate side-effect of polluting stdout with
broken pipe messages on shell pipelines invocations (e.g. echo foo |
grep something | etc.) in shell scripts spawned via subprocess.Popen().

This commit fix the polluting of stdout by restoring the default SIGPIPE
handler on subprocess calls.

[1] - http://bugs.python.org/issue1652

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/run-report.py
This page took 0.024744 seconds and 4 git commands to generate.