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

Terminal API: Terminal object should include PID of the launched terminal #11775

Closed
daviwil opened this issue Sep 9, 2016 · 2 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label

Comments

@daviwil
Copy link
Contributor

daviwil commented Sep 9, 2016

The new terminal API is looking great! It'd be really helpful to me if I could get the process ID of the launched terminal as a property on the Terminal object. I need this information in the PowerShell extension to help coordinate with my debug adapter.

Also: could there possibly be a promise return type from createTerminal so that the Terminal only gets returned after the process is started, or maybe a different way like having an event on the Terminal object that is returned?

@ramya-rao-a ramya-rao-a added the terminal General terminal issues that don't fall under another label label Sep 9, 2016
@Tyriar
Copy link
Member

Tyriar commented Sep 9, 2016

Exposing the PID and/or related info is to be explored in #11422. It would be useful if you could say on that issue exactly what you will do with the PID when you have it.

On createTerminal returning a promise, it was originally like this and @jrieken said that we normally hide the promise behind the scenes. So what happens now is that all calls on the Terminal returned by createTerminal are queued until the process is ready and then they're sent, so it should work roughly the same as a promise by just using it immediately after createTerminal. Example here: https://github.com/Microsoft/vscode-extension-samples/blob/70e8e730636549678703ba779aa2eaf5b309ecc4/terminal-example/src/extension.ts#L50

@Tyriar Tyriar closed this as completed Sep 9, 2016
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 9, 2016
@daviwil
Copy link
Contributor Author

daviwil commented Sep 9, 2016

Thanks Daniel! The API approach you mention makes sense. I left a comment on the other issue to explain what I'd use the PID for.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

3 participants