I don’t know what command is sent to force exit in the IDE In nodejs, you can listen to the exit of the program by listening to the semaphore For example, SIGINT listens to ctrl-D/Control-C to exit the program
process.on('SIGINT', function() {
console.log('Got SIGINT. Press Control-D/Control-C to exit.');
});
https://nodejs.org/api/process.html#process_event_exit
Cannot monitor
Forced exit semaphore cannot add callback function in node
I don’t know what command is sent to force exit in the IDE
In nodejs, you can listen to the exit of the program by listening to the semaphore
For example, SIGINT listens to ctrl-D/Control-C to exit the program