querysub 0.213.0 → 0.215.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.213.0",
3
+ "version": "0.215.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -123,13 +123,7 @@ const getLinuxChildPids = measureWrap(async function getLinuxChildPids(pid: stri
123
123
  });
124
124
  const isScreenRunningProcess = measureWrap(async function isScreenRunningProcess(pid: string): Promise<boolean> {
125
125
  try {
126
- let childPids = await getLinuxChildPids(pid);
127
- let bashPid = childPids.find(x => x.CMD.includes("bash"));
128
- 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
- return true;
131
- }
132
- let bashChildPids = await getLinuxChildPids(bashPid.PID);
126
+ let bashChildPids = await getLinuxChildPids(pid);
133
127
  for (let childPid of bashChildPids) {
134
128
  console.log(`Screen pid ${pid} is running ${childPid.CMD}`);
135
129
  return true;
@@ -152,8 +146,8 @@ const getScreenState = measureWrap(async function getScreenState(populateIsProce
152
146
  .split("\n")
153
147
  .filter(x => x.includes(delimit))
154
148
  .map(x => ({
155
- screenName: x.split(delimit)[0],
156
- pid: x.split(delimit)[1],
149
+ screenName: x.split(delimit)[0].trim(),
150
+ pid: x.split(delimit)[1].trim(),
157
151
  isProcessRunning: false,
158
152
  }))
159
153
  .filter(x => x.screenName.endsWith(SCREEN_SUFFIX))