Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debt - unset DYLD_LIBRARY_PATH before forking #106211

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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