Comparing version 2.0.10-alpha.1 to 2.0.10-alpha.2
@@ -19,2 +19,3 @@ var debug = require('debug')('nodemon:run'); | ||
var signals = require('./signals'); | ||
const osRelease = require('os').release(); | ||
@@ -316,2 +317,9 @@ function run(options) { | ||
if (utils.isWindows) { | ||
const taskKill = () => { | ||
try { | ||
exec('taskkill /pid ' + child.pid + ' /T /F'); | ||
} catch (e) { | ||
utils.log.error("Could not shutdown sub process cleanly"); | ||
} | ||
} | ||
@@ -321,3 +329,3 @@ // We are handling a 'SIGKILL' POSIX signal under Windows the | ||
// a hard shutdown without waiting for the process to clean-up. | ||
if (signal === 'SIGKILL') { | ||
if (signal === 'SIGKILL' || osRelease < 10) { | ||
@@ -330,3 +338,3 @@ debug('terminating process group by force: %s', child.pid); | ||
// process in this context is actually a cmd.exe wrapper. | ||
exec(`taskkill /f /t /pid ${child.pid}`); | ||
taskKill(); | ||
callback(); | ||
@@ -369,7 +377,3 @@ return; | ||
} catch (e) { | ||
try { | ||
exec('taskkill /pid ' + child.pid + ' /T /F'); | ||
} catch (e) { | ||
utils.log.error("Could not shutdown sub process cleanly"); | ||
} | ||
taskKill(); | ||
} | ||
@@ -376,0 +380,0 @@ callback(); |
@@ -70,3 +70,3 @@ { | ||
"_version": "0.0.0-development", | ||
"version": "2.0.10-alpha.1", | ||
"version": "2.0.10-alpha.2", | ||
"funding": { | ||
@@ -73,0 +73,0 @@ "type": "opencollective", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194050
2629