[New-bugs-announce] [issue25666] Python unexpectedly ignores a signal after fork
report at bugs.python.org
Thu Nov 19 04:00:33 EST 2015
New submission from jon orebro:
I found a slight problem with signal handling. It seems that if you have a signal handler setup for a signal, right after a fork the child ignores that signal for a short time. This is regardless of what the signal handler is setup to do. This can cause hangs if the parent immediately kills and then waits for the child. Since the timeframe is small, in practice this only happens sometimes (se example). There might be a reason for this behavour, but in that case I think it should me mentioned in the docs.
What I expected:
I expected the child to, at any point in time, either do the default action for the signal (terminate in this case), or to run the signal handler.
It ignores the signal for a short while.
assignee: docs at python
components: Documentation, Interpreter Core
nosy: docs at python, jon orebro
title: Python unexpectedly ignores a signal after fork
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file41074/example.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce