I know it's possible to send SIGTERM
, SIGINT
, etc. to your own process in the C programming language:
https://www.gnu.org/software/libc/manual/html_node/Signaling-Yourself.html
Does Node.js provide this functionality?
I know it's possible to send SIGTERM
, SIGINT
, etc. to your own process in the C programming language:
https://www.gnu.org/software/libc/manual/html_node/Signaling-Yourself.html
Does Node.js provide this functionality?
process.kill(process.pid, "SIGINT");
process.kill
sends a signal (SIGINT
in this case, provided by the second parameter), to a provided PID. (process.pid
in this case, which is the PID of the running node process.)
Source: https://nodejs.org/api/process.html#process_process_kill_pid_signal