kakserpom / phpdaemon

Asynchronous server-side framework for network applications implemented in PHP using libevent
http://daemon.io/
GNU Lesser General Public License v3.0
1.53k stars 231 forks source link

fixes: pcntl_sigtimedwait missing(on mac), composer syntax error #172

Closed hitsmaxft closed 10 years ago

hitsmaxft commented 10 years ago

The unexpected shutdown of master thread was caused by missing function on Mac OS. Related error infomation was suppress by "@", which took me lots of time in debugging : (

The previous solution in the project does not work on my laptop. signal-triggered function calls on protected method were outside the instance scope. so I move the code into an protected method in \PHPDaemon\Thread\Generic.

kakserpom commented 10 years ago

I think you should check if (!function_exists('pcntl_sigtimedwait')) { Inside of "protected function sigtimedwait". Or rename this method to something like "sigtimedwaitFallback". Does it make sense?

kakserpom commented 10 years ago

And thank you for your patience and very valuable contribution :+1: