# Objective Closes #47412 Currently, processes that ignore SIGHUP/SIGTERM will not be killed when the terminal is closed or Zed is closed. ## Solution We need to follow up on the processes to ensure that they have been properly killed BEFORE zed closes fully. We send SIGTERM then 100ms later send SIGKILL, this gives programs some time to exit gracefully before being SIGKILL'd. ## Testing I tested it by both closing the terminal pane and closing zed completely, both worked. There is a new test added as well. The best way to test it is with the reproduction in this comment: https://github.com/zed-industries/zed/issues/47412#issuecomment-4596563655 I only tested this on MacOS 27. It might be worth testing on linux, but also mac/linux behavior here should be quite similar. Windows behavior as well should be unchanged but could be worth testing. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments Okay there is an unsafe block in this PR, but its just being moved from one location to another, and it didn't originally have a comment, I assume because its just a libc call so its pretty clear. - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Video showcasing the new behavior: https://github.com/user-attachments/assets/b2b8cb0c-0648-41b4-b940-91c466aeaab3 --- Release Notes: - Terminal: Prevents processes from being left alive when the terminal is closed.
2 files changedLine totals unavailable