<?php posix_getpgid(int $process_id): int|false
<?php } if (posix_getpgid($pid) === false) { unlink(self::SOCKET); unlink(self::PID_FILE);
<?php $wait = 5000; // 5ms $timeout = 1000000; // 1 sec $elapsed = 0; while (posix_getpgid($pid) !== false) { usleep($wait); $elapsed += $wait; if ($elapsed > $timeout) {