Author eryksun
Recipients AR-Kareem, eryksun
Date 2020-12-25.05:01:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608872503.53.0.472680557122.issue42730@roundup.psfhosted.org>
In-reply-to
Content
When a process executes in the background from a non-interactive bash script, the initial handler for SIGINT is SIG_IGN (ignore). Prior to 3.7, _thread.interrupt_main() tries to trip SIGINT even when the C handler is set to SIG_IGN. But Python uses an integer constant for SIG_IGN (named IgnoreHandler in Modules/signalmodule.c), and trying to call it is a TypeError. This was fixed in 3.7+ to resolve bpo-23395. You've flagged this as an issue with 3.7, but the Stack Overflow question is for 3.6. If you're actually using 3.6 instead of 3.7, this issue should be closed as a duplicate.

To manually enable the normal KeyboardInterrupt exception, call signal.signal(signal.SIGINT, signal.default_int_handler).
History
Date User Action Args
2020-12-25 05:01:43eryksunsetrecipients: + eryksun, AR-Kareem
2020-12-25 05:01:43eryksunsetmessageid: <1608872503.53.0.472680557122.issue42730@roundup.psfhosted.org>
2020-12-25 05:01:43eryksunlinkissue42730 messages
2020-12-25 05:01:43eryksuncreate