MCPcopy Index your code
hub / github.com/garrytan/gstack / cleanChromiumProfileLocks

Function cleanChromiumProfileLocks

browse/src/cli.ts:222–226  ·  view source on GitHub ↗

Remove Chromium SingletonLock/Socket/Cookie so a relaunch can acquire the * profile. Safe to call when absent.

(profileDir: string = chromiumProfileDir())

Source from the content-addressed store, hash-verified

220/** Remove Chromium SingletonLock/Socket/Cookie so a relaunch can acquire the
221 * profile. Safe to call when absent. */
222function cleanChromiumProfileLocks(profileDir: string = chromiumProfileDir()): void {
223 for (const lockFile of ['SingletonLock', 'SingletonSocket', 'SingletonCookie']) {
224 safeUnlinkQuiet(path.join(profileDir, lockFile));
225 }
226}
227
228/** Kill an orphaned Chromium that still holds the profile's SingletonLock. The
229 * lock symlink target is "hostname-PID"; killing that PID tears down its

Callers 2

startServerFunction · 0.85
mainFunction · 0.85

Calls 2

safeUnlinkQuietFunction · 0.90
chromiumProfileDirFunction · 0.85

Tested by

no test coverage detected