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

Bug #17225 Sig handler dies due to possible incorrectly defined sighandler
Submitted: 2010-03-15 22:38 UTC
From: austinb Assigned: kvz
Status: Closed Package: System_Daemon (version 0.10.1)
PHP Version: 5.3.0 OS: CentOS 5.4
Roadmaps: (Not assigned)    
Subscription  


 [2010-03-15 22:38 UTC] austinb (Austin Bis)
Description: ------------ Seems there is a badly defined entry in the $_sigHandlers array. The entry on line 415 in Daemon.php causes the issue. Commenting out the line allows the daemon to start as expected. static protected $_sigHandlers = array( ... 'SIG_BLOCK' => array('System_Daemon', 'defaultSigHandler'), ... ); Test script: --------------- Any Daemon script that worked in 0.9.2 Expected result: ---------------- Script should start and become a daemon. Actual result: -------------- Script starts but then errors out with the following in the log: [Mar 15 13:17:10] notice: Startup written to '/etc/rc.d/init.d/StatsDaemon-' [Mar 15 13:17:10] notice: Starting StatsDaemon daemon, output in: /var/log/StatsDaemon.log [Mar 15 13:17:10] warning: Orphaned pidfile found and removed: /var/run/StatsDaemon/StatsDaemon.pid. Previous process crashed? [l:1223] [Mar 15 13:17:10] warning: [PHP Error] pcntl_signal(): Error assigning signal [l:1289] [Mar 15 13:17:10] emerg: Unable to reroute signal handler: 0 [l:1293]

Comments

 [2010-03-15 22:55 UTC] austinb (Austin Bis)
-Summary: Sign handler dies due to possible incorrectly defined sighandler +Summary: Sig handler dies due to possible incorrectly defined sighandler
 [2010-03-16 00:31 UTC] kvz (Kevin van Zonneveld)
This bug is not reproducible on my system, but I hope this commit could fix it: http://github.com/kvz/system_daemon/commit/5836cc3618a3e23890c7dd24b4f5e37c 164267dd It will be part of the 10.2 which I'm planning to release next
 [2010-03-16 00:31 UTC] kvz (Kevin van Zonneveld)
-Status: Open +Status: Closed -Assigned To: +Assigned To: kvz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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.