Feature Request: wt.exe to return PID of new child process on Standard Output #19460

Open
opened 2026-01-31 06:43:59 +00:00 by claunia · 0 comments
Owner

Originally created by @martin-rueegg on GitHub (Feb 25, 2023).

Description of the new feature/enhancement

In some scenarios it is important to be able to store the PID of a newly created shell (to kill it or wait for its termination asynchronously, to name two).

When launching a new wt.exe instance in order to run a command in another tab or split-pane, the console is actually instantiated from the already running instance. Hence, the calling instance terminates and the new console is not a child of the invoking console.

While it makes no sense to keep all the WT instances alive, it would be great if the PID of the newly created console could be returned on standard output, upon request.

Proposed technical implementation details (optional)

Add an additional option that is used when launching a new command, console, tab, or pane, e.g. --return-pid that would return the PID of the invoked child process, if wt.exe terminates.

Originally created by @martin-rueegg on GitHub (Feb 25, 2023). # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> In some scenarios it is important to be able to store the PID of a newly created shell (to kill it or wait for its termination asynchronously, to name two). When launching a new `wt.exe` instance in order to run a command in another tab or split-pane, the console is actually instantiated from the already running instance. Hence, the calling instance terminates and the new console is not a child of the invoking console. While it makes no sense to keep all the WT instances alive, it would be great if the PID of the newly created console could be returned on standard output, upon request. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Add an additional option that is used when launching a new command, console, tab, or pane, e.g. `--return-pid` that would return the PID of the invoked child process, if `wt.exe` terminates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19460