[issue1054041] Python doesn't exit with proper resultcode on SIGINT

STINNER Victor report at bugs.python.org
Wed Feb 13 19:06:50 EST 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> A question that leads to is what _is_ the correct value.

What do you think of using a short test program (ex: uses raise(SIGINT)) in ./configure to get the "default exit code" to define a constant, and then use the constant for exit() in Python?

I dislike the idea of raising signals in general. The exact behavior of signals depends too much on the OS, it's hard to get it right. But having a configurable exit code looks safe and simple enough.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1054041>
_______________________________________


More information about the Python-bugs-list mailing list