signal.set_wakeup_fd()

signal.set_wakeup_fd(fd) → fd

Sets the fd to be written to (with ‘0’) when a signal comes in. A library can use this to wakeup select or poll. The previous fd is returned.

The fd must be non-blocking.