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

Function shouldTerminateStoredProcess

src/daemon/app-log-process.ts:56–64  ·  view source on GitHub ↗
(meta: StoredAppLogProcessMeta)

Source from the content-addressed store, hash-verified

54}
55
56function shouldTerminateStoredProcess(meta: StoredAppLogProcessMeta): boolean {
57 const currentStartTime = readProcessStartTime(meta.pid);
58 if (!currentStartTime) return false;
59 if (meta.startTime && currentStartTime !== meta.startTime) return false;
60 const currentCommand = readProcessCommand(meta.pid);
61 if (!currentCommand || !isManagedAppLogCommand(currentCommand)) return false;
62 if (meta.command && currentCommand !== meta.command) return false;
63 return true;
64}
65
66export function readStoredAppLogProcessMeta(
67 pidPath: string | undefined,

Callers 1

Calls 3

readProcessStartTimeFunction · 0.90
readProcessCommandFunction · 0.90
isManagedAppLogCommandFunction · 0.85

Tested by

no test coverage detected