Skip to content

Commit 47d5f58

Browse files
committed
debug remove stdFork usage
fixes microsoft#41190
1 parent 19a9d83 commit 47d5f58

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/vs/workbench/parts/debug/node/debugAdapter.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as paths from 'vs/base/common/paths';
1212
import * as strings from 'vs/base/common/strings';
1313
import * as objects from 'vs/base/common/objects';
1414
import * as platform from 'vs/base/common/platform';
15-
import * as stdfork from 'vs/base/node/stdFork';
1615
import { Emitter, Event } from 'vs/base/common/event';
1716
import { TPromise } from 'vs/base/common/winjs.base';
1817
import { ExtensionsChannelId } from 'vs/platform/extensionManagement/common/extensionManagement';
@@ -285,13 +284,14 @@ export class DebugAdapter extends StreamDebugAdapter {
285284

286285
if (this.adapterExecutable.command === 'node' && this.outputService) {
287286
if (Array.isArray(this.adapterExecutable.args) && this.adapterExecutable.args.length > 0) {
288-
stdfork.fork(this.adapterExecutable.args[0], this.adapterExecutable.args.slice(1), {}, (err, child) => {
289-
if (err) {
290-
e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from '{0}'.", this.adapterExecutable.args[0])));
291-
}
292-
this.serverProcess = child;
293-
c(null);
287+
const child = cp.fork(this.adapterExecutable.args[0], this.adapterExecutable.args.slice(1), {
288+
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
294289
});
290+
if (!child.pid) {
291+
e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from '{0}'.", this.adapterExecutable.args[0])));
292+
}
293+
this.serverProcess = child;
294+
c(null);
295295
} else {
296296
e(new Error(nls.localize('unableToLaunchDebugAdapterNoArgs', "Unable to launch debug adapter.")));
297297
}

0 commit comments

Comments
 (0)