mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
add windows exit code support
This commit is contained in:
@@ -109,7 +109,7 @@ class Framework
|
||||
* 未测试
|
||||
* @throws ZMKnownException
|
||||
*/
|
||||
public function stop()
|
||||
public function stop(int $retcode = 0)
|
||||
{
|
||||
switch ($this->driver->getName()) {
|
||||
case 'swoole':
|
||||
@@ -120,7 +120,7 @@ class Framework
|
||||
if (extension_loaded('posix')) {
|
||||
posix_kill(ProcessStateManager::getProcessState(ZM_PROCESS_MASTER)['pid'], SIGTERM);
|
||||
} else {
|
||||
Worker::stopAll();
|
||||
Worker::stopAll($retcode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user