Yup.
tye is right. I am wrong. S'ok. I've been wrong before. hehehe.
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);
}
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}.
Thanks for setting me straight,
tye.