Signal handles implement Unix style signal handling on a per-event loop bases. Reception of the generic
uv.Signalsis emulated on Windows. Watchers for other signals can be successfully created, but these signals are never received.
On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to manage threads. Installing watchers for those signals will lead to unpredictable behavior and is strongly discouraged. Future versions of libuv may simply reject them.
uv.UVError – error during the initialization of the handle
- loop (Loop) – event loop which should be used for the handle
- callback ((uv.Signal, int) -> None) – callback which should be called on signal delivery
Callback which should be called on signal delivery.
Readonly: False Type: (uv.Signal, int) -> None
Signal being monitored by this handle.
Raises: uv.HandleClosedError – handle has already been closed or is closing Readonly: True Return type: int
Starts the handle.
- signum (int) – signal number which should be monitored
- callback ((uv.Signal) -> None) – callback which should be called on signal delivery
Generic signals enumeration.
Is normally delivered when the user presses CTRL+C. However it is not generated when terminal is in raw mode.
Is delivered when the user presses CTRL+BREAK.
Is generated when the user closes the console window. After that the OS might terminate the program after a few seconds.
Is generated when the console window has been resized. On Windows libuv emulates SIGWINCH when the program uses a
uv.TTYhandle to write to the console. It may not always be delivered in a timely manner, because libuv will only detect changes when the cursor is being moved. When a readable
uv.TTYhandle is used in raw mode, resizing the console buffer will also trigger SIGWINCH.