We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
COMMAND
1 parent 10b90e3 commit 209a45eCopy full SHA for 209a45e
index.js
@@ -28,6 +28,12 @@ module.exports = function childrenOfPid(pid, callback) {
28
// ps 20688 16965 R+
29
// ```
30
//
31
+ // Darwin:
32
+ // $ ps -A -o comm,ppid,pid,stat
33
+ // COMM PPID PID STAT
34
+ // /sbin/launchd 0 1 Ss
35
+ // /usr/libexec/Use 1 43 Ss
36
+ //
37
// Win32:
38
// 1. wmic PROCESS WHERE ParentProcessId=4604 GET Name,ParentProcessId,ProcessId,Status)
39
// 2. The order of head columns is fixed
@@ -112,6 +118,9 @@ function normalizeHeader(str) {
112
118
case 'Status':
113
119
return 'STAT';
114
120
break;
121
+ case 'COMM': // for darwin
122
+ return 'COMMAND';
123
+ break;
115
124
default:
116
125
throw new Error('Unknown process listing header: ' + str);
117
126
}
0 commit comments