p2  0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Aio_signal Class Reference

create and init a Aio_signal object More...

Public Member Functions

static PN aio_signal_start (Potion *P, PN cl, PN self, PN cb, PN signum)
 
static PN aio_signal_stop (Potion *P, PN cl, PN self)
 

Detailed Description

create and init a Aio_signal object

UNIX signal handling on a per-event loop basis. The implementation is not ultra efficient so don't go creating a million event loops with a million signal watchers.

Note to Linux users: 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.

Some signal support is available on Windows:

SIGINT is normally delivered when the user presses CTRL+C. However, like on Unix, it is not generated when terminal raw mode is enabled.

SIGBREAK is delivered when the user pressed CTRL+BREAK.

SIGHUP is generated when the user closes the console window. On SIGHUP the program is given approximately 10 seconds to perform cleanup. After that Windows will unconditionally terminate it.

SIGWINCH is raised whenever libuv detects that the console has been resized. SIGWINCH is emulated by libuv when the program uses an Aio_tty handle to write to the console. SIGWINCH may not always be delivered in a timely manner; libuv will only detect size changes when the cursor is being moved. When a readable Aio_tty handle is used in raw mode, resizing the console buffer will also trigger a SIGWINCH signal.

Watchers for other signals can be successfully created, but these signals are never generated. These signals are: SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM and SIGKILL.

Note that calls to raise() or abort() to programmatically raise a signal are not detected by libuv; these will not trigger a signal watcher.

Parameters
loopAio_loop, defaults to uv_default_loop()

Member Function Documentation

static PN aio_signal_start ( Potion P,
PN  cl,
PN  self,
PN  cb,
PN  signum 
)

Definition at line 1472 of file aio.c.

static PN aio_signal_stop ( Potion P,
PN  cl,
PN  self 
)

Definition at line 1481 of file aio.c.


The documentation for this class was generated from the following file: