New submission from Jan Velecký:
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
--
assignee: docs@python
components: Documentation
messages: 281664
nosy: Jan Velecký, docs@python
priority: normal
severity: normal
status: open
title: Misleading stating, that SIGINT handler is installed by default
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<http://bugs.python.org/issue28795>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com