Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which among the following POSIX signals generate events?

a) SIGDOWN
b) SIGFLOAT
c) SIGINT
d) SIGSHORT

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));

Join The Discussion