By default Python sets SIGPIPE to SIG_IGN on startup, because
it prefers to check every write and raise an IOError exception rather
than taking SIGPIPE. This is all well and good for Python itself.
However, non-Python Unix subprocesses generally expect to have
SIGPIPE set to the default action, since that's what will happen if
they're started from a normal shell.
As a result scripts with piping that is terminated in reverse chain
order are never exit.
Reviewed: https:/ /review. openstack. org/295833 /git.openstack. org/cgit/ openstack/ murano- agent/commit/ ?id=75712716ba5 2e945965ab58862 0e8d9d26795c40
Committed: https:/
Submitter: Jenkins
Branch: master
commit 75712716ba52e94 5965ab588620e8d 9d26795c40
Author: Stan Lagun <email address hidden>
Date: Tue Mar 22 16:47:49 2016 +0300
Restores SIGPIPE on script processes
There is an issue https:/ /bugs.python. org/issue1652
in Python 2.7 which was resolved in Py3.
By default Python sets SIGPIPE to SIG_IGN on startup, because
it prefers to check every write and raise an IOError exception rather
than taking SIGPIPE. This is all well and good for Python itself.
However, non-Python Unix subprocesses generally expect to have
SIGPIPE set to the default action, since that's what will happen if
they're started from a normal shell.
As a result scripts with piping that is terminated in reverse chain
order are never exit.
See more info here: www.enricozini. org/blog/ 2009/debian/ python- pipes/
http://
Closes-Bug: #1524347 6a0be97a6b9c297 f8d14fd3f7c
Change-Id: Ia015e7fd46912f