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/node_binding.cc | |
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/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 82836585c58..37c64000650 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) \ |