|Welcome to the Monastery|
SIGPIPE not trapped after sleep in CGIby GwenDragon (Novice)
|on Oct 28, 2012 at 11:35 UTC||Need Help??|
GwenDragon has asked for the
wisdom of the Perl Monks concerning the following question:
Please, I'd like to know, why SIPIPE is not trapped after aborting a CGI connection and using sleep()?
1. Uploaded CGI to webserver
2. fetched it with browser
3. After 5-10 seconds hit abort button in browser
4. Inspect debug.txt
5. Only END output is in debug file.
Then i thought, using pragma traphandler would help so solve the prob. I tried use sigtrap 'handler' => \&my_handler, 'normal-signals'; to trap SIGPIPE, without any effort.
After removing sleep in my testcase the trapping of SIGPIPE by my signal handler works fine.
Why does sleep disable signal trapping and the installed signal handler? Can yo explain this ti me?