diff options
author | legendecas <legendecas@gmail.com> | 2019-08-19 16:03:08 +0300 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2020-02-17 22:37:11 +0300 |
commit | 3dd4089b9ae23607dfa92ca2369c4248345f3275 (patch) | |
tree | 4e81e324c6890f39cec424b472483968b567cd69 /src/async_wrap.h | |
parent | ef4d0816601a329928f244de5e1702c6dd78b692 (diff) |
src,lib: make ^C print a JS stack trace
If terminating the process with ctrl-c / SIGINT, prints a JS stacktrace
leading up to the currently executing code.
The feature would be enabled under option `--trace-sigint`.
Conditions of no stacktrace on sigint:
- has (an) active sigint listener(s);
- main thread is idle (i.e. uv polling), a message instead of stacktrace
would be printed.
PR-URL: https://github.com/nodejs/node/pull/29207
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/async_wrap.h')
-rw-r--r-- | src/async_wrap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/async_wrap.h b/src/async_wrap.h index dd82497a259..86acf54cd68 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -68,6 +68,7 @@ namespace node { V(TTYWRAP) \ V(UDPSENDWRAP) \ V(UDPWRAP) \ + V(SIGINTWATCHDOG) \ V(WORKER) \ V(WRITEWRAP) \ V(ZLIB) |