Message 281664 - Python tracker

Message281664

Author Jan Velecký
Recipients Jan Velecký, docs@python
Date 2016-11-24.22:25:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,
documentation (https://docs.python.org/2/library/signal.html) states, that Python by default installs SIGINT handler which cause KeyboardInterrupt. This is not true everytime according to implementation.
"Python installs a small number of signal handlers by default: SIGPIPE ... and SIGINT is translated into a KeyboardInterrupt exception."
It should also mention this "SIGINT is installed only, when default handler is set at startup.". Because user can run python script from non-interative shell as background task and SIGINT handler is not installed, regardless although user does not change Python default behaviour.

Related SO:
http://stackoverflow.com/questions/40775054/capturing-sigint-using-keyboardinterrupt-exception-works-in-terminal-not-in-scr/40785230?noredirect=1
History
Date User Action Args
2016-11-24 22:25:57Jan Veleckýsetrecipients: + Jan Velecký, docs@python
2016-11-24 22:25:57Jan Veleckýsetmessageid: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za>
2016-11-24 22:25:57Jan Veleckýlinkissue28795 messages
2016-11-24 22:25:57Jan Veleckýcreate