From 26b1f144211d1dffe204570799353228f7026bb2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 25 Jun 2018 11:49:11 +0200 Subject: [PATCH] ipc: log signal also when process crashes --- src/vs/base/parts/ipc/node/ipc.cp.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/base/parts/ipc/node/ipc.cp.ts b/src/vs/base/parts/ipc/node/ipc.cp.ts index b59747adc40..40d8fb8ff6b 100644 --- a/src/vs/base/parts/ipc/node/ipc.cp.ts +++ b/src/vs/base/parts/ipc/node/ipc.cp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ChildProcess, fork } from 'child_process'; +import { ChildProcess, fork, ForkOptions } from 'child_process'; import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import { Delayer } from 'vs/base/common/async'; @@ -125,7 +125,7 @@ export class Client implements IChannelClient, IDisposable { private get client(): IPCClient { if (!this._client) { const args = this.options && this.options.args ? this.options.args : []; - const forkOpts = Object.create(null); + const forkOpts: ForkOptions = Object.create(null); forkOpts.env = assign(deepClone(process.env), { 'VSCODE_PARENT_PID': String(process.pid) }); @@ -183,7 +183,7 @@ export class Client implements IChannelClient, IDisposable { } if (code !== 0 && signal !== 'SIGTERM') { - console.warn('IPC "' + this.options.serverName + '" crashed with exit code ' + code); + console.warn('IPC "' + this.options.serverName + '" crashed with exit code ' + code + ' and signal ' + signal); this.disposeDelayer.cancel(); this.disposeClient(); } -- GitLab