-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix #6767: don't reuse integrated terminal that has child processes #6769
fix #6767: don't reuse integrated terminal that has child processes #6769
Conversation
c1c2da7
to
c8ff6d6
Compare
Thanks for the patch @a1994846931931, please note that I am working on the shell argument escaping for the |
@marechal-p
which may be problematic, while VSCode's implementation is far more complicated: https://github.com/microsoft/vscode/blob/4636be2b71c87bfb0bfe3c94278b447a5efcc1f1/src/vs/workbench/contrib/debug/node/terminals.ts#L79-L210 Although I haven't encountered any broken issues so far, it reminds me of a line in
where the argument I hope the information helpful. |
…d processes Signed-off-by: Cai Xuye <a1994846931931@gmail.com>
Signed-off-by: Cai Xuye <a1994846931931@gmail.com>
c8ff6d6
to
44d87e7
Compare
Yes, thank you for the infos. So again, just so that we do not duplicate work: I already have a commit for the command escaping, I will open and attend a PR with it first week of January as I will be taking vacations. With your patch + the commit I made, we should be pretty close to what VS Code does :) |
@marechal-p |
@elaihau @vince-fugnitto @marechal-p please finish the review |
@@ -41,4 +43,46 @@ export class ShellTerminalServer extends BaseTerminalServer { | |||
return Promise.resolve(-1); | |||
} | |||
} | |||
|
|||
// copied and modified from https://github.com/microsoft/vscode/blob/4636be2b71c87bfb0bfe3c94278b447a5efcc1f1/src/vs/workbench/contrib/debug/node/terminals.ts#L32-L75 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a CQ for the following copied code:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21340
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM, shells are also not reused if a process is already running. Should be good to merge once the CQs are resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elaihau
to if (!terminal || (await terminal.hasChildProcesses())) { after this commit. Nevertheless, however, I'm not sure whether the |
The CQ has finally been approved! 🍾 |
@a1994846931931 please merge! |
Signed-off-by: Cai Xuye a1994846931931@gmail.com
What it does
Fix #6767.
How to test
Demo gif for the 1st commit (propose 1 in Integrated terminal should not be resused if a process is running in it #6767):
Update gif for the 2nd commit (propose 2 in Integrated terminal should not be resused if a process is running in it #6767):
I've tested in only on Linux. Could anyone test it on windows as well? Thanks!
Review checklist
Reminder for reviewers