pubo-node 1.0.162 → 1.0.165
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.
|
@@ -17,7 +17,7 @@ function getProcessName(pid) {
|
|
|
17
17
|
reject(err);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
|
-
resolve(data);
|
|
20
|
+
resolve(data.toString().split(':')[1]?.trim());
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
});
|
|
@@ -125,10 +125,16 @@ async function SIGKILL(pid, signal = 2) {
|
|
|
125
125
|
flatProcessTree(tree, tmp);
|
|
126
126
|
tmp.reverse();
|
|
127
127
|
tree = null;
|
|
128
|
+
let success = true;
|
|
128
129
|
for (const item of tmp) {
|
|
129
|
-
|
|
130
|
+
try {
|
|
131
|
+
await _SIGKILL(item, signal);
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
success = false;
|
|
135
|
+
}
|
|
130
136
|
}
|
|
131
|
-
return
|
|
137
|
+
return success;
|
|
132
138
|
}
|
|
133
139
|
// 子进程心跳包
|
|
134
140
|
const heartbeat = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubo-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.165",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@types/node": "^17.0.25",
|
|
21
|
-
"pubo-utils": "^1.0.
|
|
21
|
+
"pubo-utils": "^1.0.164",
|
|
22
22
|
"yaml": "^2.5.1"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "93126c2ba44c242e56b04d34871da52a763293cc",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"del": "^5.1.0",
|
|
27
27
|
"eslint": "^8.42.0",
|