From 9d269849987fbe374b0f76a4893fdf9d867b8b84 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Tue, 2 Apr 2019 17:13:14 +0800 Subject: Add terminate process implemntation note --- editors/code/src/utils/processes.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editors/code/src/utils/processes.ts b/editors/code/src/utils/processes.ts index d4c2c8778..f62e2a346 100644 --- a/editors/code/src/utils/processes.ts +++ b/editors/code/src/utils/processes.ts @@ -8,6 +8,13 @@ import { join } from 'path'; const isWindows = process.platform === 'win32'; const isMacintosh = process.platform === 'darwin'; const isLinux = process.platform === 'linux'; + +// this is very complex, but is basically copy-pased from VSCode implementation here: +// https://github.com/Microsoft/vscode-languageserver-node/blob/dbfd37e35953ad0ee14c4eeced8cfbc41697b47e/client/src/utils/processes.ts#L15 + +// And see discussion at +// https://github.com/rust-analyzer/rust-analyzer/pull/1079#issuecomment-478908109 + export function terminate(process: ChildProcess, cwd?: string): boolean { if (isWindows) { try { -- cgit v1.2.3