in reply to (tye)Re: Just making sure...
in thread Detect Stop Button
Run this code and hit the STOP button while it's looping. You'll get $SIG{PIPE} and possibly $SIG{TERM} as well. Comment out the print line, and the script will run to completion -- because, although STDOUT is closed, the script isn't printing. So, it never fails on a write to STDOUT to cause the $SIG{PIPE}.use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use sigtrap qw(handler croak normal-signals error-signals); $|=1; print &header; for (1..60) { # Comment the next line, and see the difference! print "$_<BR>\n"; sleep(1); }
|
|---|