diff --git a/doc/api/cli.md b/doc/api/cli.md index 9434e19d3b73..fe6422392251 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -3333,6 +3333,19 @@ added: Prints a stack trace on SIGINT. +### `--trace-sigterm` + + + +Prints a stack trace on SIGTERM. + +Unlike a `SIGTERM` handler installed with `process.on('SIGTERM')`, the trace is +also printed while JavaScript is stuck, for example in an infinite loop. If +the application does not handle `SIGTERM` itself, the process is terminated by +the signal as usual once the trace has been printed. + ### `--trace-sync-io`