[TIC-Web] fixed the problem that mic can not be canceled 44/113544/1
authorChangHyun Lee <leechwin.lee@samsung.com>
Wed, 8 Feb 2017 06:00:24 +0000 (15:00 +0900)
committerChangHyun Lee <leechwin.lee@samsung.com>
Wed, 8 Feb 2017 06:00:24 +0000 (15:00 +0900)
modified with the kill command to terminate the root process in tree-kill module.

Change-Id: I7bd9b8e74494d87b54fa4dd8215ad759d3c1a7ba
Signed-off-by: ChangHyun Lee <leechwin.lee@samsung.com>
package.json
server/fs/mic.js

index 6154a83..dac5f7a 100644 (file)
@@ -37,7 +37,8 @@
     "winston": "~2.3.0",
     "jsnlog": "~2.22.0",
     "jsnlog-nodejs": "~2.22.0",
-    "moment": "~2.17.1"
+    "moment": "~2.17.1",
+    "tree-kill": "https://github.com/leechwin/node-tree-kill.git#master"
   },
   "devDependencies": {
     "bower": "~1.8.0",
index c17dfc8..49df483 100644 (file)
@@ -6,6 +6,7 @@
 var fs = require('fs');
 var path = require('path');
 var exec = require('child_process').exec;
+var TreeKill = require('tree-kill');
 var util = require('util');
 var JL = require('jsnlog').JL;
 var SocketEvent = require('./socketEvent');
@@ -23,7 +24,7 @@ Mic.kill = function () {
     if (ps === null) {
         return;
     }
-    ps.kill();
+    TreeKill(ps.pid, 'SIGKILL');
     ps = null;
 }