Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Document signal support on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Aug 15, 2012
1 parent c19966b commit 36a1eaf
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions include/uv.h
Expand Up @@ -1580,6 +1580,29 @@ UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle);
*
* TODO(bnoordhuis) As of 2012-08-10 only the default event loop supports
* signals. That will be fixed.
*
* 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. When SIGHUP
* appears the program is given approximately 10 seconds to perform cleanup.

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Aug 15, 2012

Contributor

s/When SIGHUP appears/ On SIGHUP/ ?

* 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 uv_tty_t
* 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.
*
* Watchers for other signals can be successfully created, but these signals
* are never generated. Note that calls to to raise() or abort() to

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Aug 15, 2012

Contributor

s/to to/to/ and s/is not/are not/ in line below. Does the raise() issue apply only to SIGILL, SIGABRT, etc. or to all signals?

This comment has been minimized.

Copy link
@piscisaureus

piscisaureus Aug 15, 2012

Author

To all signals. I will document this.

It is possible to make it work with raise(), but I don't think anyone would care.

* programmatically raise a signal is not detected by libuv; these will not
* trigger a signal watcher. These signals are: SIGILL, SIGABRT, SIGFPE,
* SIGSEGV, SIGTERM and SIGKILL.
*/
struct uv_signal_s {
UV_HANDLE_FIELDS
Expand Down

2 comments on commit 36a1eaf

@piscisaureus
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrPizza @bnoordhuis (and @igorzi if you're still interested)
Does this sound reasonable?

@bnoordhuis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the typos, yes. :-)

Please sign in to comment.