Skip to content

Commit 85a19e4

Browse files
minor fixes to Darwin process tree
1 parent 18cba4b commit 85a19e4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import { LinuxProcessTree } from "./linux-process-tree";
22

3-
function fill(prefix: string, suffix: string, length: number): string {
4-
return prefix + suffix.repeat(length - prefix.length);
5-
}
6-
73
export class DarwinProcessTree extends LinuxProcessTree {
84
protected override getCommandArguments(): string[] {
95
return [
10-
"-xo",
6+
"-axo",
117
// The length of comm must be large enough or data will be truncated.
12-
`pid=PID,lstart=START,comm=${fill("COMMAND", "-", 256)},command=ARGUMENTS`,
8+
`pid=PID,lstart=START,comm=${"COMMAND".padEnd(256, "-")},args=ARGUMENTS`,
139
];
1410
}
1511
}

0 commit comments

Comments
 (0)