parseProcArgv
parseProcArgv(
raw): readonlystring[]
Defined in: packages/core/src/kernel/lib/proc-parsers.ts:109
Parse the contents of /proc/<pid>/argv into an argv array.
Parameters
Section titled “Parameters”string
Raw file contents from /proc/<pid>/argv.
Returns
Section titled “Returns”readonly string[]
Readonly array of argv tokens in order; empty when input is blank.
Remarks
Section titled “Remarks”Format: one argument per line, trailing newline (procFS convention).
An empty or whitespace-only input returns [] — the parser does not
throw on a process that has no argv yet.
Example
Section titled “Example”import { parseProcArgv } from '@fishnet/core'
const argv = parseProcArgv('sh\n-c\necho hi\n')// argv === ['sh', '-c', 'echo hi']