Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Request #15991 Handle SIGPIPE
Submitted: 2009-03-08 02:43 UTC
From: mplomer Assigned: kvz
Status: Closed Package: System_Daemon (version 0.6.9)
PHP Version: 5.2.9 OS: Linux
Roadmaps: (Not assigned)    

 [2009-03-08 02:43 UTC] mplomer (Mark Plomer)
Description: ------------ I think SIGPIPE should also be handled (ignored) by default in $_sigHandlers, because if the daemon implements a socket server, a broken pipe should not cause the server to shut down. What do you think?


 [2009-03-11 15:01 UTC] kvz (Kevin van Zonneveld)
-Status: Open +Status: Feedback
Thanks for your input. I haven't used System_Daemon as such yet. Could you be more specific as to how you're implementing it? That way I could test it, figure out what the default should be (if any) and if it works.
 [2009-03-11 15:01 UTC] kvz (Kevin van Zonneveld)
-Assigned To: +Assigned To: kvz
 [2009-03-30 00:03 UTC] mplomer (Mark Plomer)
Sorry for the long answer-time (I was on a journey ;-)). If you use the daemon as a simple socket server, and for example the server sends data to the client, while the client has already closed the connection, the kernel sends a SIGPIPE to the process, which by default terminates the process. This may be good for command line applications, but not for daemons, of course. So I think, SIGPIPE should also be ignored by System_Daemon in addition to the other signals in $_sigHandlers in System/Daemon.php
 [2009-04-25 15:43 UTC] kvz (Kevin van Zonneveld)
-Status: Feedback +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Thanks Mark, I understand the issue and have fixed it in svn. I will soon release a new version of System_Daemon.