terminal: Give child processes time to exit on their own (#47408)

Closes #44003

Supersedes https://github.com/zed-industries/zed/pull/45777

Co-authored-by: Lukas <lukas@zed.dev>

Release Notes:

- Fixed an issue where the terminal would sometimes fail to write shell
history.

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
76c885771aSmit Barmase committed on 1/22/2026, 5:49:34 PM· committed by GitHubparent1791125
4 files changedLine totals unavailable