mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
Fix shutdown of ac monitor on Windows
This commit is contained in:
parent
5dc33015f7
commit
11d4a7f8d3
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ var util = require('util');
|
||||||
var events = require('events');
|
var events = require('events');
|
||||||
var childProcess = require('child_process');
|
var childProcess = require('child_process');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
|
var os = require('os');
|
||||||
|
|
||||||
const ProcessGroupStates = {
|
const ProcessGroupStates = {
|
||||||
STOPPED: 'stopped',
|
STOPPED: 'stopped',
|
||||||
|
@ -176,7 +177,11 @@ Process.prototype = extend(Process.prototype, {
|
||||||
console.warn("Can't stop process that is not started.");
|
console.warn("Can't stop process that is not started.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (os.type() == "Windows_NT") {
|
||||||
|
childProcess.spawn("taskkill", ["/pid", this.child.pid, '/f', '/t']);
|
||||||
|
} else {
|
||||||
this.child.kill();
|
this.child.kill();
|
||||||
|
}
|
||||||
this.state = ProcessStates.STOPPING;
|
this.state = ProcessStates.STOPPING;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue