lepetitalbert has asked for the wisdom of the Perl Monks concerning the following question:
Hello dear Monks,
I tried all %SIG's :
... $SIG{HUP} = sub { print "You cannot HUP me !"; }; $SIG{ILL} = sub { print "You cannot ILL me !"; }; $SIG{INT} = sub { print "You cannot INT me !"; }; ... while (1) { print "\nyes"; sleep (1); }
Complete code here.
This works with ctrl+c (it prints 'You cannot INT me !' and goes on).
But when I close cmd.exe, it prints 'You cannot HUP me !' and die.
Any idea ?
Thanks.
Have a nice day.
"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
Back to
Seekers of Perl Wisdom