kill immediately. by default, it sends SIGTERM

This commit is contained in:
girish@cloudron.io
2016-02-09 12:03:09 -08:00
parent e752949752
commit 0785266741

View File

@@ -137,7 +137,7 @@ function stopAppTask(appId, callback) {
if (gActiveTasks[appId]) {
debug('stopAppTask : Killing existing task of %s with pid %s', appId, gActiveTasks[appId].pid);
gActiveTasks[appId].once('exit', function () { callback(); });
gActiveTasks[appId].kill(); // this will end up calling the 'exit' handler
gActiveTasks[appId].kill('SIGKILL'); // this will end up calling the 'exit' handler
return;
}