MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / parsePid

Function parsePid

src/cli/bot-process.ts:18–21  ·  view source on GitHub ↗
(raw: string | null | undefined)

Source from the content-addressed store, hash-verified

16
17/** Parse a PID from a pidfile body. PURE. */
18export function parsePid(raw: string | null | undefined): number | null {
19 const n = parseInt(String(raw ?? '').trim(), 10);
20 return Number.isInteger(n) && n > 0 ? n : null;
21}
22
23/** Is a pid alive? (kill 0 probes without signalling.) */
24export function isAlive(pid: number): boolean {

Callers 2

botStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected