querysub 0.214.0 → 0.216.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
|
@@ -124,17 +124,12 @@ const getLinuxChildPids = measureWrap(async function getLinuxChildPids(pid: stri
|
|
|
124
124
|
});
|
|
125
125
|
const isScreenRunningProcess = measureWrap(async function isScreenRunningProcess(pid: string): Promise<boolean> {
|
|
126
126
|
try {
|
|
127
|
-
let
|
|
128
|
-
let bashPid = childPids.find(x => x.CMD.includes("bash"));
|
|
129
|
-
if (!bashPid) {
|
|
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)}`);
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
let bashChildPids = await getLinuxChildPids(bashPid.PID);
|
|
127
|
+
let bashChildPids = await getLinuxChildPids(pid);
|
|
134
128
|
for (let childPid of bashChildPids) {
|
|
135
129
|
console.log(`Screen pid ${pid} is running ${childPid.CMD}`);
|
|
136
130
|
return true;
|
|
137
131
|
}
|
|
132
|
+
console.log(`Screen pid ${pid} is not running anything.`);
|
|
138
133
|
return false;
|
|
139
134
|
} catch (e: any) {
|
|
140
135
|
console.warn(`Error checking if screen is running for ${pid}: ${e.stack}`);
|