Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/Playwright/Servers/PlaywrightNpmServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ public function start(): void
public function stop(): void
{
if ($this->systemProcess instanceof SystemProcess && $this->isRunning()) {
// The Playwright node server needs time to clean up its browser
// children — especially Chromium in headed mode, which can take
// close to a second to shut down gracefully. With the old 0.1s
// timeout, SIGTERM raced the browser teardown and Symfony would
// escalate to SIGKILL while children were still detaching,
// leaving the parent pest process waiting on zombie file handles.
$this->systemProcess->stop(
timeout: 0.1,
timeout: 2.0,
signal: PHP_OS_FAMILY === 'Windows' ? null : SIGTERM,
);
}
Expand Down