[New-bugs-announce] [issue26350] Windoes: signal doc should state certains signals can't be registered
report at bugs.python.org
Fri Feb 12 09:01:43 EST 2016
New submission from Giampaolo Rodola':
I'm not sure whether this is a bug with signal.signal doc or with the function itself, anyway, here goes. On UNIX I'm able to register a signal handler for SIGTERM which is executed when the signal is received. On Windows I'm able to register it but it will never be executed:
import os, signal
print("foo") # this never gets printed on Windows
I think signal module doc should be more clear about this. In details, if it is possible to execute a function on SIGTERM if should explain how. If not (and AFAIK it's not possible) it should state that "signal.signal(signal.SIGTERM, foo)" on Windows is a NOOP.
Note: I'm probably missing something but the same thing applies for SIGINT and possibly (all) other signals, so I'm not sure why Windows has signal.signal in the first place. What's its use case on Windows?
title: Windoes: signal doc should state certains signals can't be registered
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce