Skip to content
Closed
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
3 changes: 3 additions & 0 deletions browse/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,9 @@ const idleCheckInterval = setInterval(() => {
const BROWSE_PARENT_PID = parseInt(process.env.BROWSE_PARENT_PID || '0', 10);
if (BROWSE_PARENT_PID > 0) {
setInterval(() => {
// Headed mode: the user is looking at the browser. Don't kill it
// just because the CLI command that launched it has exited.
if (browserManager.getConnectionMode() === 'headed') return;
try {
process.kill(BROWSE_PARENT_PID, 0); // signal 0 = existence check only, no signal sent
} catch {
Expand Down