This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, rsebille, vstinner, yselivanov
Date 2017-01-18.15:04:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484751893.18.0.663135679486.issue29309@psf.upfronthosting.co.za>
In-reply-to
Content
Sending SIGTERM (CTRL+c, KeyboardInterrupt) while Python is waiting in threading.Thread.join() is not supported.

You have a thread running time.sleep(1). On Linux, this function calls the select() syscall. So you have the main thread waiting for the thread state lock, and a thread waiting in select(). If SIGTERM is received in the main thread, you enter a weird state of the threading module.

Python has a signal.pthread_kill() which might help to only send a signal to a specific thread, but I don't know exactly how Python behaves, since Python wants to execute Python signal handles in the main thread...
History
Date User Action Args
2017-01-18 15:04:53vstinnersetrecipients: + vstinner, gvanrossum, yselivanov, rsebille
2017-01-18 15:04:53vstinnersetmessageid: <1484751893.18.0.663135679486.issue29309@psf.upfronthosting.co.za>
2017-01-18 15:04:53vstinnerlinkissue29309 messages
2017-01-18 15:04:52vstinnercreate