Skip to content

Commit 6619052

Browse files
committed
Stop tns process on extension deactivation
1 parent 0652ad7 commit 6619052

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/debug-adapter/webKitDebugAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
358358
public disconnect(): Promise<void> {
359359
this.clearEverything();
360360
if (this._tnsProcess) {
361-
kill(this._tnsProcess.pid, 'SIGQUIT')
361+
kill(this._tnsProcess.pid, 'SIGINT')
362362
this._tnsProcess = null;
363363
}
364364
if (this._webKitConnection) {

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Services} from './services/extensionHostServices';
44
import {Project} from './project/project';
55
import {IosProject} from './project/iosProject';
66
import {AndroidProject} from './project/androidProject';
7+
import * as kill from 'tree-kill';
78

89
// this method is called when the extension is activated
910
export function activate(context: vscode.ExtensionContext) {
@@ -54,6 +55,10 @@ export function activate(context: vscode.ExtensionContext) {
5455
tnsProcess.on('close', exitCode => {
5556
runChannel.hide();
5657
});
58+
59+
context.subscriptions.push({
60+
dispose: () => kill(tnsProcess.pid, "SIGINT")
61+
});
5762
};
5863

5964
let runIosCommand = vscode.commands.registerCommand('nativescript.runIos', () => {

0 commit comments

Comments
 (0)