pkrumins / node-tree-kill

kill trees of processes
MIT License
333 stars 37 forks source link

process not killed with a git bash on windows. #22

Open jdflaugergues opened 6 years ago

jdflaugergues commented 6 years ago

Hi,

I'm using an Angular wep application launched from a git bash terminal with ng serve. When I want to exit the Angular web app with a Ctrl+C, the Angular @ngtools using tree-kill as a dependency send the following command treeKill(this._typeCheckerProcess.pid, 'SIGTERM') with the good pid. But tree-kill try to kill process by a taskkill command not recognized by git bash. The issue is that it's the process.platform (here win32) which is identified and not the prompt.

Therefore, to resolve this issue, we have to identified git bash terminal and execute the following command exec('tskill' + pid) instead.

billiegoose commented 6 years ago

My git bash has no problem running taskkill... you should be able to run DOS commands like "dir" in git bash. Right?