Skip to content

Commit

Permalink
fix pcntl_signal_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
李亮 authored and 李亮 committed Jun 4, 2017
1 parent b4eb49b commit 9d69291
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Events/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ public function add($fd, $flag, $func, $args = array())
$this->_allEvents[$fd_key][$flag] = array($func, $fd);
$this->_writeFds[$fd_key] = $fd;
break;
case self::EV_EXCEPT:
$fd_key = (int)$fd;
$this->_allEvents[$fd_key][$flag] = array($func, $fd);
$this->_exceptFds[$fd_key] = $fd;
break;
case self::EV_SIGNAL:
// Windows not support signal.
if(DIRECTORY_SEPARATOR !== '/') {
Expand Down Expand Up @@ -250,7 +255,7 @@ public function loop()
{
$e = null;
while (1) {
if(DIRECTORY_SEPARATOR !== '/') {
if(DIRECTORY_SEPARATOR === '/') {
// Calls signal handlers for pending signals
pcntl_signal_dispatch();
}
Expand Down

0 comments on commit 9d69291

Please sign in to comment.