You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observed: Sabre emits a notice.
Desired: Prevent that notice, or add a configurable way for applications using sabre\event to suppress that notice
Context: This was seen in an application calling pcntl_signal() to listen for signals, then calling pcntl_fork() to create child processes (it would get signalled from within the sabre event loop)
The approach taken by reactphp looks like it was to call set_error_handler before the stream operation (e.g. stream_select()), and call restore_error_handler immediately after (and check if the error was caused by pcntl in that handler)
/path/to/vendor/sabre/event/lib/Loop/Loop.php:305 [2] stream_select(): unable to select [4]: Interrupted system call (max_fd=0)
#0 my_custom_error_handler()
#1 stream_select() called at [/path/to/vendor/sabre/event/lib/Loop/Loop.php:305]
#2 Sabre\Event\Loop\Loop->runStreams() called at [/path/to/vendor/sabre/event/lib/Loop/Loop.php:233]
#3 Sabre\Event\Loop\Loop->tick() called at [/path/to/vendor/sabre/event/lib/Loop/Loop.php:194]
#4 Sabre\Event\Loop\Loop->run() called at [/path/to/vendor/sabre/event/lib/Loop/functions.php:122]
#5 Sabre\Event\Loop\run() called at ...
I can work around this by changing my_custom_error_handler
The text was updated successfully, but these errors were encountered:
Observed: Sabre emits a notice.
Desired: Prevent that notice, or add a configurable way for applications using sabre\event to suppress that notice
Context: This was seen in an application calling pcntl_signal() to listen for signals, then calling pcntl_fork() to create child processes (it would get signalled from within the sabre event loop)
reactphp/reactphp#296 mentions a similar issue.
See the note in https://secure.php.net/manual/en/function.stream-select.php#refsect1-function.stream-select-returnvalues
This happens in 5.0.3, probably also in master: https://github.com/sabre-io/event/blob/5.0.3/lib/Loop/Loop.php#L305
The approach taken by reactphp looks like it was to call set_error_handler before the stream operation (e.g. stream_select()), and call restore_error_handler immediately after (and check if the error was caused by pcntl in that handler)
I can work around this by changing my_custom_error_handler
The text was updated successfully, but these errors were encountered: