add windows exit code support

This commit is contained in:
crazywhalecc
2022-08-22 21:32:00 +08:00
parent 6f30c04899
commit 05ac2feebd
2 changed files with 3 additions and 6 deletions

View File

@@ -37,10 +37,7 @@ ob_event_provider()->addEventListener(WorkerStartEvent::getName(), function () {
} finally {
global $_swoole_atomic;
$_swoole_atomic->set($retcode ?? 0);
if (DIRECTORY_SEPARATOR === '\\') {
exit($retcode ?? 0);
}
Framework::getInstance()->stop();
Framework::getInstance()->stop($retcode ?? 0);
}
}, 1);