We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b233a2 commit 62c0b6dCopy full SHA for 62c0b6d
src/utils/HavenoUtils.ts
@@ -91,8 +91,12 @@ export default class HavenoUtils {
91
process.on("error", function(err: any) { reject(err); });
92
93
if (global.process.platform === 'win32') {
94
- exec(`taskkill /PID ${process.pid} /T /F`, err => {
95
- if (err) reject(err);
+ exec(`tasklist /FI "PID eq ${process.pid}"`, (err, stdout) => {
+ if (stdout.includes(process.pid.toString())) {
96
+ exec(`taskkill /PID ${process.pid} /T /F`, err => {
97
+ if (err) reject(err);
98
+ });
99
+ }
100
});
101
} else {
102
process.kill(signal ? signal : "SIGINT");
0 commit comments