amalgm 0.1.59 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/process-cleanup.js +11 -1
- package/package.json +1 -1
package/lib/process-cleanup.js
CHANGED
|
@@ -99,7 +99,7 @@ function listProcProcesses() {
|
|
|
99
99
|
pid,
|
|
100
100
|
ppid: readProcPpid(pid),
|
|
101
101
|
command: readProcCommand(pid),
|
|
102
|
-
env:
|
|
102
|
+
env: null,
|
|
103
103
|
}))
|
|
104
104
|
.filter((item) => item.command);
|
|
105
105
|
} catch {
|
|
@@ -141,6 +141,14 @@ function listProcesses() {
|
|
|
141
141
|
}));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
function withEnv(item) {
|
|
145
|
+
if (!item || item.env) return item;
|
|
146
|
+
return {
|
|
147
|
+
...item,
|
|
148
|
+
env: readProcEnv(item.pid),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
function normalizedCommand(command) {
|
|
145
153
|
return String(command || '').replace(/\\/g, '/');
|
|
146
154
|
}
|
|
@@ -195,6 +203,7 @@ function runtimeServiceProcesses(options = {}) {
|
|
|
195
203
|
return listProcesses()
|
|
196
204
|
.filter((item) => !exclude.has(item.pid))
|
|
197
205
|
.filter((item) => commandLooksLikeRuntimeService(item.command, item, options))
|
|
206
|
+
.map(withEnv)
|
|
198
207
|
.filter((item) => envMatchesAmalgmDir(item.env));
|
|
199
208
|
}
|
|
200
209
|
|
|
@@ -203,6 +212,7 @@ function supervisorProcesses(options = {}) {
|
|
|
203
212
|
return listProcesses()
|
|
204
213
|
.filter((item) => !exclude.has(item.pid))
|
|
205
214
|
.filter((item) => commandLooksLikeSupervisor(item.command))
|
|
215
|
+
.map(withEnv)
|
|
206
216
|
.filter((item) => envMatchesAmalgmDir(item.env));
|
|
207
217
|
}
|
|
208
218
|
|