Which among the following POSIX signals generate events?

Answer: c
Explanation: The SIGINT is a POSIX signal that generates event. Simple code like below can do a proper clean up and exit on CTRL-C or SIGINT passed from command line / other application to the nodejs app’s ProcessID.
process.on('SIGINT', function()
console.log('SIGINT');
cleanup()
process.exit(1));
 

Tìm kiếm

Back
Top