Skip to content

fix(mcp): respect fs-based lock file for chromium family#39377

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:lock_file
Feb 24, 2026
Merged

fix(mcp): respect fs-based lock file for chromium family#39377
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:lock_file

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

}

export function isProfileLocked(userDataDir: string): boolean {
const lockFile = process.platform === 'win32' ? 'lockfile' : 'SingletonLock';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the name different between platforms?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Chrome folks decided to keep the pipe and the file names separate.

const pid = parseInt(target.split('-').pop() || '', 10);
if (isNaN(pid))
return false;
process.kill(pid, 0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if it's a legit browser closure, just taking longer than usual?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We kill(0) - probe.

@pavelfeldman pavelfeldman merged commit aa71b38 into microsoft:main Feb 24, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browser_navigate retry loop spawns multiple about:blank tabs when profile is locked

2 participants