diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2018-09-13 17:30:59 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2019-02-11 15:55:24 +0100 |
commit | 4fc5a0ee61168565bd94864c9cd68379bb5454f3 (patch) | |
tree | a7ea09cc9b8dd331718c84252be0070463021cc7 /docs/src | |
parent | 598a49b942852285d7d9cdb7db0433e52b5b485a (diff) | |
download | libuv-4fc5a0ee61168565bd94864c9cd68379bb5454f3.tar.gz libuv-4fc5a0ee61168565bd94864c9cd68379bb5454f3.zip |
doc: describe unix signal handling better
- SIGTERM seems OK to handle - I tested that on Linux, read POSIX, etc.
I can't see why it should be different from SIGUSR1, for example,
except that the default handler is different.
- Also raise(15) is caught by the handler for me, and I can't see
why it wouldn't.
The main source of knowledge for this is POSIX.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03
PR-URL: https://github.com/libuv/libuv/pull/1987
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/signal.rst | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/docs/src/signal.rst b/docs/src/signal.rst index f52b6470..f5a809ab 100644 --- a/docs/src/signal.rst +++ b/docs/src/signal.rst @@ -6,7 +6,10 @@ Signal handles implement Unix style signal handling on a per-event loop bases. -Reception of some signals is emulated on Windows: +Windows notes +------------- + +Reception of some signals is emulated: * SIGINT is normally delivered when the user presses CTRL+C. However, like on Unix, it is not generated when terminal raw mode is enabled. @@ -24,13 +27,22 @@ Reception of some signals is emulated on Windows: * Calls to raise() or abort() to programmatically raise a signal are not detected by libuv; these will not trigger a signal watcher. -.. note:: - 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. - .. versionchanged:: 1.15.0 SIGWINCH support on Windows was improved. +Unix notes +---------- + +* SIGKILL and SIGSTOP are impossible to catch. + +* Handling SIGBUS, SIGFPE, SIGILL or SIGSEGV via libuv results into undefined behavior. + +* SIGABRT will not be caught by libuv if generated by `abort()`, e.g. through `assert()`. + +* 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. + + Data types ---------- |