Skip to content

Commit

Permalink
fix tests (#3921)
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf authored Dec 9, 2020
1 parent 6a25f2d commit 66b3745
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext-src/swoole_coroutine_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void php_swoole_set_coroutine_option(zend_array *vht) {
Coroutine::set_stack_size(zval_get_long(ztmp));
}
if (PHPCoroutine::options) {
zend_hash_merge(PHPCoroutine::options, vht, nullptr, true);
zend_hash_merge(PHPCoroutine::options, vht, zval_add_ref, true);
} else {
PHPCoroutine::options = zend_array_dup(vht);
}
Expand Down
8 changes: 6 additions & 2 deletions src/os/signal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,12 @@ static int swSignalfd_onSignal(Reactor *reactor, swEvent *event) {
return SW_OK;
}
if (signals[siginfo.ssi_signo].activated) {
if (signals[siginfo.ssi_signo].handler) {
signals[siginfo.ssi_signo].handler(siginfo.ssi_signo);
swSignalHandler handler = signals[siginfo.ssi_signo].handler;
if (handler == SIG_IGN) {
return SW_OK;
}
else if (handler) {
handler(siginfo.ssi_signo);
} else {
swoole_error_log(SW_LOG_WARNING,
SW_ERROR_UNREGISTERED_SIGNAL,
Expand Down

0 comments on commit 66b3745

Please sign in to comment.