From b054c98967243731b4bd965c866cf2a24dffc149 Mon Sep 17 00:00:00 2001 From: legendecas Date: Sun, 15 Dec 2019 16:10:32 +0800 Subject: [PATCH] doc: add abnormal termination step 1 Confirming if the process was exited for proactive invocation of `process.exit`. --- .../step1/using_exit_stack_traces.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/documentation/abnormal_termination/step1/using_exit_stack_traces.md b/documentation/abnormal_termination/step1/using_exit_stack_traces.md index 8ad1dfb..4a5ff53 100644 --- a/documentation/abnormal_termination/step1/using_exit_stack_traces.md +++ b/documentation/abnormal_termination/step1/using_exit_stack_traces.md @@ -1 +1,15 @@ -//TODO +# Using `--trace-exit` CLI Option + +`--trace-exit` CLI option will print a stack trace on every proactive `process.exit` +invocation. It is convenient to confirm if the abnormal exit of the process was +initiated from an invocation of `process.exit` or something other crashes. + +## How To + +```bash +> node --trace-exit src/abnormal-exit.js +``` + +## Useful Links + +- https://nodejs.org/docs/latest/api/cli.html#cli_trace_exit