Skip to content

Commit

Permalink
Separated out the signal and updated the package version
Browse files Browse the repository at this point in the history
  • Loading branch information
carnun committed May 19, 2020
1 parent c120b9a commit 2de5bc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/killer.js
Expand Up @@ -2,7 +2,7 @@ const psTree = require('ps-tree');
const spawn = require('cross-spawn');
const { exec } = require('child_process');

let KILL_SIGNAL = '-15'; // SIGTERM
let KILL_SIGNAL = '15'; // SIGTERM
let hasPS = true;

const isWindows = process.platform === 'win32';
Expand All @@ -21,10 +21,10 @@ module.exports = function kill(child) {
} else {
if (hasPS) {
psTree(child.pid, function(err, kids) {
spawn('kill', [KILL_SIGNAL, child.pid].concat( kids.map(p => p.PID) )).on('close', resolve);
spawn('kill', ['-' + KILL_SIGNAL, child.pid].concat( kids.map(p => p.PID) )).on('close', resolve);
});
} else {
exec('kill ' + KILL_SIGNAL + ' ' + child.pid, resolve);
exec('kill -' + KILL_SIGNAL + ' ' + child.pid, resolve);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tsc-watch",
"version": "4.2.6",
"version": "4.2.7",
"description": "The TypeScript compiler with onSuccess command",
"scripts": {
"test": "mocha test/**/*.js"
Expand Down

0 comments on commit 2de5bc8

Please sign in to comment.