MCPcopy Index your code
hub / github.com/callstack/agent-device / writeProcessLockOwner

Function writeProcessLockOwner

src/utils/process-lock.ts:62–66  ·  view source on GitHub ↗
(ownerFilePath: string, owner: ProcessLockOwner)

Source from the content-addressed store, hash-verified

60}
61
62function writeProcessLockOwner(ownerFilePath: string, owner: ProcessLockOwner): void {
63 const tmpOwnerFilePath = `${ownerFilePath}.${process.pid}.${Date.now()}.tmp`;
64 fs.writeFileSync(tmpOwnerFilePath, JSON.stringify(owner), 'utf8');
65 fs.renameSync(tmpOwnerFilePath, ownerFilePath);
66}
67
68function clearStaleProcessLock(
69 lockDirPath: string,

Callers 1

acquireProcessLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected