querysub 0.213.0 → 0.214.0
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/package.json
CHANGED
|
@@ -118,6 +118,7 @@ const getLinuxChildPids = measureWrap(async function getLinuxChildPids(pid: stri
|
|
|
118
118
|
} else {
|
|
119
119
|
let table = await runPromise(`ps -eo pid,ppid,cmd`);
|
|
120
120
|
let obj = textTableLineToObj(table) as { PPID: string; PID: string; CMD: string }[];
|
|
121
|
+
console.log(`getLinuxChildPids: ${JSON.stringify(obj)}`);
|
|
121
122
|
return obj.filter(x => x.PPID === pid);
|
|
122
123
|
}
|
|
123
124
|
});
|
|
@@ -126,7 +127,7 @@ const isScreenRunningProcess = measureWrap(async function isScreenRunningProcess
|
|
|
126
127
|
let childPids = await getLinuxChildPids(pid);
|
|
127
128
|
let bashPid = childPids.find(x => x.CMD.includes("bash"));
|
|
128
129
|
if (!bashPid) {
|
|
129
|
-
console.error(`Screen pid ${pid} isn't even running bash? What? We can't check if it's running the process or not, so returning true, which disables crash detection... is running ${JSON.stringify(childPids)}`);
|
|
130
|
+
console.error(`Screen pid ${pid} isn't even running bash? What? We can't check if it's running the process or not, so returning true, which disables crash detection... is running: ${JSON.stringify(childPids)}`);
|
|
130
131
|
return true;
|
|
131
132
|
}
|
|
132
133
|
let bashChildPids = await getLinuxChildPids(bashPid.PID);
|
|
@@ -152,8 +153,8 @@ const getScreenState = measureWrap(async function getScreenState(populateIsProce
|
|
|
152
153
|
.split("\n")
|
|
153
154
|
.filter(x => x.includes(delimit))
|
|
154
155
|
.map(x => ({
|
|
155
|
-
screenName: x.split(delimit)[0],
|
|
156
|
-
pid: x.split(delimit)[1],
|
|
156
|
+
screenName: x.split(delimit)[0].trim(),
|
|
157
|
+
pid: x.split(delimit)[1].trim(),
|
|
157
158
|
isProcessRunning: false,
|
|
158
159
|
}))
|
|
159
160
|
.filter(x => x.screenName.endsWith(SCREEN_SUFFIX))
|