Skip to content

Commit

Permalink
fix 4
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Dec 13, 2024
1 parent 34330e3 commit b7d1929
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/os/wait.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pid_t System::waitpid(pid_t __pid, int *__stat_loc, int __options, double timeou
WaitTask task;
signal_init();
task.pid = ::waitpid(__pid, __stat_loc, __options | WNOHANG);
if (task.pid > 0) {
if (task.pid != 0) {
return task.pid;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_runtime/base.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ swoole_runtime: base
require __DIR__ . '/../include/bootstrap.php';
$server = SwooleTest\CoServer::createTcpGreeting();
$server->run();
Swoole\Runtime::enableCoroutine(true, SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_SLEEP);
Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_SLEEP);
go(function () {
usleep(1000);
echo '1' . PHP_EOL;
Expand Down

0 comments on commit b7d1929

Please sign in to comment.