Skip to content

Commit 740464e

Browse files
committed
ensure child process is killed on linux
fixes tomblind#49
1 parent 963f6cb commit 740464e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extension/luaDebugSession.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ export class LuaDebugSession extends LoggingDebugSession {
212212
const processOptions/* : child_process.SpawnOptions */ = {
213213
env: Object.assign({}, process.env),
214214
cwd,
215-
shell: true
215+
shell: true,
216+
detached: true
216217
};
217218

218219
if (typeof this.config.env !== "undefined") {
@@ -673,7 +674,7 @@ export class LuaDebugSession extends LoggingDebugSession {
673674
if (process.platform === "win32") {
674675
childProcess.spawn("taskkill", ["/pid", this.assert(this.process.pid).toString(), "/f", "/t"]);
675676
} else {
676-
this.process.kill();
677+
process.kill(-this.assert(this.process.pid), "SIGKILL");
677678
}
678679
}
679680

0 commit comments

Comments
 (0)