Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"minimist": "^1.2.8",
"native-is-elevated": "0.9.0",
"native-keymap": "^3.3.5",
"node-pty": "^1.2.0-beta.10",
"node-pty": "^1.2.0-beta.12",
"open": "^10.1.2",
"playwright-core": "1.59.0-alpha-2026-02-20",
"tas-client": "0.3.1",
Expand Down
8 changes: 4 additions & 4 deletions remote/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"katex": "^0.16.22",
"kerberos": "2.1.1",
"minimist": "^1.2.8",
"node-pty": "^1.2.0-beta.10",
"node-pty": "^1.2.0-beta.12",
"tas-client": "0.3.1",
"vscode-oniguruma": "1.7.0",
"vscode-regexpp": "^3.1.0",
Expand Down
10 changes: 9 additions & 1 deletion src/vs/platform/terminal/node/childProcessMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,20 @@ export class ChildProcessMonitor extends Disposable {
readonly onDidChangeHasChildProcesses = this._onDidChangeHasChildProcesses.event;

constructor(
private readonly _pid: number,
private _pid: number,
@ILogService private readonly _logService: ILogService
) {
super();
}

/**
* Updates the pid to monitor. This is needed when the pid is not available
* immediately after spawn (e.g. node-pty deferred conpty connection).
*/
setPid(pid: number): void {
this._pid = pid;
}

/**
* Input was triggered on the process.
*/
Expand Down
15 changes: 14 additions & 1 deletion src/vs/platform/terminal/node/terminalProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,20 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
this._exitCode = e.exitCode;
this._queueProcessExit();
}));
this._sendProcessId(ptyProcess.pid);
// node-pty >= 1.2.0-beta.11 defers conptyNative.connect() on Windows, so
// ptyProcess.pid may be 0 immediately after spawn. In that case we wait
// for the first data event which only fires after the connection completes
// and the real pid is available. See microsoft/node-pty#885.
if (ptyProcess.pid > 0) {
this._sendProcessId(ptyProcess.pid);
} else {
const dataListener = ptyProcess.onData(() => {
dataListener.dispose();
this._childProcessMonitor?.setPid(ptyProcess.pid);
this._sendProcessId(ptyProcess.pid);
});
this._register(dataListener);
}
this._setupTitlePolling(ptyProcess);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ const terminalConfiguration: IStringDictionary<IConfigurationPropertySchema> = {
},
[TerminalSettingId.WindowsUseConptyDll]: {
restricted: true,
markdownDescription: localize('terminal.integrated.windowsUseConptyDll', "Whether to use the experimental conpty.dll (v1.23.251008001) shipped with VS Code, instead of the one bundled with Windows."),
markdownDescription: localize('terminal.integrated.windowsUseConptyDll', "Whether to use the experimental conpty.dll (v1.25.260303002) shipped with VS Code, instead of the one bundled with Windows."),
type: 'boolean',
tags: ['preview'],
default: false,
Expand Down
Loading