<?php
Swoole\Server->on('workererror', callback $callback)
The event name
callback function
if success, it returns TRUE, otherwise it returns FALSE.
Executue the callback function when a Worker Process is stopped caused by Error or Exception.
The callback funciton is executed in the Manager Process
.
<?php
function (Swoole\Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal) {
}
$worker_id
the id number of worker$worker_pid
the pid of worker process$exit_code
the exit code of worker process$signal
the exit signal of worker process