-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Fix/windows pty crash #11559
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/windows pty crash #11559
Changes from all commits
500356c
c015273
43b49bd
c464d31
92b3a2f
b10e42b
eb2eaeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -769,11 +769,14 @@ export class ShellExecutionService { | |
| // Ignore errors if the pty has already exited, which can happen | ||
| // due to a race condition between the exit event and this call. | ||
| if ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could you add a regression test, so if this line is removed it would fail.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @galz10, thank you for the feedback. I have now added regression tests to cover the fix for the pty resize issue. I'd |
||
| e instanceof Error && | ||
| (('code' in e && e.code === 'ESRCH') || | ||
| e.message === 'Cannot resize a pty that has already exited') | ||
| <<<<<<< HEAD | ||
| (e instanceof Error && 'code' in e && e.code === 'ESRCH') || | ||
| (e instanceof Error && | ||
| e.message.includes('Cannot resize a pty that has already exited')) | ||
| ) { | ||
| // ignore | ||
| // On Unix, we get an ESRCH error. | ||
| // On Windows, we get a message-based error. | ||
| // In both cases, it's safe to ignore. | ||
| } else { | ||
| throw e; | ||
| } | ||
|
|
||
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.
Nit: could you add a regression test, so if this line is removed it would fail.
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.
Hi @galz10, thank you for the feedback. I have now added regression tests to cover the fix for the pty resize issue. I'd
appreciate it if you could review the changes again.