Check fgets when ask for exit
Status: Beta
Brought to you by:
darrenbounds
Currently when an interrupt is received exit function
ask for (y/n) input in a forever loop until the user
answers "y" or "n".
Unfortunately if the process is not running
interactively and has no input available it does not
check for error and loops forever.
With this patch, when an error is detected it assumes
that the user really wants to quit.
Check fgets return value on user imput