Skip to content

Commit

Permalink
debt - unset DYLD_LIBRARY_PATH before forking (#106211)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 7, 2020
1 parent baeae88 commit 7458d31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/vs/base/parts/ipc/node/ipc.cp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { isRemoteConsoleLog, log } from 'vs/base/common/console';
import { CancellationToken } from 'vs/base/common/cancellation';
import * as errors from 'vs/base/common/errors';
import { VSBuffer } from 'vs/base/common/buffer';
import { isMacintosh } from 'vs/base/common/platform';

/**
* This implementation doesn't perform well since it uses base64 encoding for buffers.
Expand Down Expand Up @@ -197,6 +198,12 @@ export class Client implements IChannelClient, IDisposable {
forkOpts.execArgv = ['--nolazy', '--inspect-brk=' + this.options.debugBrk];
}

if (isMacintosh && forkOpts.env) {
// Unset `DYLD_LIBRARY_PATH`, as it leads to process crashes
// See https://github.com/microsoft/vscode/issues/105848
delete forkOpts.env['DYLD_LIBRARY_PATH'];
}

this.child = fork(this.modulePath, args, forkOpts);

const onMessageEmitter = new Emitter<VSBuffer>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class LocalProcessExtensionHost implements IExtensionHost {
}

const opts = {
env: env,
env,
// We only detach the extension host on windows. Linux and Mac orphan by default
// and detach under Linux and Mac create another process group.
// We detach because we have noticed that when the renderer exits, its child processes
Expand Down

0 comments on commit 7458d31

Please sign in to comment.