[issue14228] It is impossible to catch sigint on startup in python code

telmich report at bugs.python.org
Thu Mar 22 16:31:34 CET 2012


telmich <nico-bugs.python.org at schottelius.org> added the comment:

I think setting up SIGINT after importing site is a good solution: It will kill the program as expected and as soon as the user takes over control, she can decide what todo.

In which stage/part is the python interpreter when
I guess/hope that the race condition between initsigs(); would have been moved downwards?

I'm asking, because if 'import site' is done, the maximum output seen that could occur is

KeyboardInterrupt


if there is no code around there. Which looks way more sane that what I see currently.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14228>
_______________________________________


More information about the Python-bugs-list mailing list