diff options
author | legendecas <legendecas@gmail.com> | 2019-08-19 21:03:08 +0800 |
---|---|---|
committer | legendecas <legendecas@gmail.com> | 2020-01-28 13:52:27 +0800 |
commit | 7b7e7bd185aa606cf2845747dd3844a9b12ec9ab (patch) | |
tree | 5081e7a080edf45d2b5f82039e0d014c0ab46d96 /src/node_binding.cc | |
parent | 78743f8e3912fa04670ceab5365f081b3079507b (diff) | |
download | node-new-7b7e7bd185aa606cf2845747dd3844a9b12ec9ab.tar.gz |
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/node_binding.cc')
-rw-r--r-- | src/node_binding.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_binding.cc b/src/node_binding.cc index 82836585c5..37c6400065 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -87,6 +87,7 @@ V(v8) \ V(wasi) \ V(worker) \ + V(watchdog) \ V(zlib) #define NODE_BUILTIN_MODULES(V) \ |