提交 af63affc 编写于 作者: A Alex Dima

Fixes #27665: Let the search process never inherit `process.execArgv`

上级 28325df1
......@@ -56,6 +56,14 @@ export interface IIPCOptions {
*/
debugBrk?: number;
/**
* See https://github.com/Microsoft/vscode/issues/27665
* Allows to pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`.
* e.g. Launching the extension host process with `--debug-brk=xxx` and then forking a process from the extension host
* results in the forked process inheriting `--debug-brk=xxx`.
*/
freshExecArgv?: boolean;
/**
* Enables our createQueuedSender helper for this Client. Uses a queue when the internal Node.js queue is
* full of messages - see notes on that method.
......@@ -125,6 +133,10 @@ export class Client implements IChannelClient, IDisposable {
forkOpts.env = assign(forkOpts.env, this.options.env);
}
if (this.options && this.options.freshExecArgv) {
forkOpts.execArgv = [];
}
if (this.options && typeof this.options.debug === 'number') {
forkOpts.execArgv = ['--nolazy', '--debug=' + this.options.debug];
}
......
......@@ -207,6 +207,11 @@ export class DiskSearch {
serverName: 'Search',
timeout: timeout,
args: ['--type=searchService'],
// See https://github.com/Microsoft/vscode/issues/27665
// Pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`.
// e.g. Launching the extension host process with `--debug-brk=xxx` and then forking a process from the extension host
// results in the forked process inheriting `--debug-brk=xxx`.
freshExecArgv: true,
env: {
AMD_ENTRYPOINT: 'vs/workbench/services/search/node/searchApp',
PIPE_LOGGING: 'true',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册