Terminal: Kill Shell process before exiting
Fixes #19017
This is not the correct fix for the referenced issue.
The line that crashes in #19017 is this:
auto stderr_stream = Core::File::standard_error().release_value_but_fixme_should_propagate_errors();
This is very much a FIXME in LibLine, and should not be papered over by killing the shell unceremoniously in Terminal shutdown.
The code here is trying to open stderr, but it can't open stderr because the terminal already deleted the pty. LibLine should(?) handle stderr/stdout not being openable, or maybe even keep a handle to the "original" stdout/stderr files and assume that a user of LibLine won't change stdout/stderr after creating their line editor.
Alternatively, the Terminal should do something to communicate to the Shell that it's time to exit, and then waitpid until the shell actually exits.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!