in reply to Re: Print inside SIGNALS
in thread Print inside SIGNALS
After that, the endless loop continues. The only difference is the line feed: STDOUT is typically line buffered if output is to the terminal. So, you just don't see the output. For output to a file or socket, you might want to set $| to a true value.alarm 2; $SIG{ALRM} = \&Finish; while (1==1){}; sub Finish { print "Timeout reached\n"; }
|
|---|