1, 'JUMPHP_SCREENSHOT' => 1, 'JUMPHP_TEST' => 1]); $old = proc_open([PHP_BINARY, __DIR__ . '/fixtures/relaunch-old.php', "$dir/lock", "$dir/result", $how], [1 => ['file', '/dev/null', 'w'], 2 => ['file', '/dev/null', 'w']], $pipes, null, $env); self::assertIsResource($old); proc_close($old); $until = microtime(true) + 15; while (!is_file("$dir/result") && microtime(true) < $until) { usleep(100000); } return (string)@file_get_contents("$dir/result"); } public function testTheNewWinZikStartsOnceTheOldOneEndedWithItsLockFree(): void { self::assertSame('started', $this->relaunch('relaunch')); } public function testTheOldWayLeftTheNewOneHoldingTheOldLockItself(): void { // the cause of "a window not drawn, then nothing": the inherited lock self::assertSame('blocked', $this->relaunch('old')); } }