'relaunch']; if ($how === 'old') { // the lock as before (no owner, no take-over) $lock = fopen($lockFile, 'c+'); $until = microtime(true) + 5; while (!flock($lock, LOCK_EX | LOCK_NB)) { if (microtime(true) > $until) { file_put_contents($result, 'blocked'); exit(1); } usleep(100000); } file_put_contents($result, 'started'); exit(0); } file_put_contents($result, \App\Core\Relaunch::takeLock($lockFile, 5.0) !== null ? 'started' : 'blocked');