[docs] [issue25787] Add an explanation what happens with subprocess parent and child processes when signals are sent
Martin Panter
report at bugs.python.org
Thu Dec 3 18:07:21 EST 2015
Martin Panter added the comment:
These are mainly questions of the OS, not really of Python or the subprocess module. I’m not sure the Python documentation is the right place for this information, unless it gives a misleading impression.
At least in Unix, signals may be sent to the child process only, or to a process group including the parent and the child. Processes can run concurrently, in which case the order is meaningless.
Signal handlers are inherited when os.fork() or similar copies a process, but cannot be inherited when a process is replaced or spawned, because the child is not a copy of the parent.
I think the “restore_signals” flag is an unnecessary and could be deprecated. The purpose of Python ignoring some signals is so that things like writing to a disconnected pipe or socket does not trigger the default signal handling.
----------
nosy: +martin.panter
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25787>
_______________________________________
More information about the docs
mailing list