# terminal: Kill the terminal child process, not the terminal process on exit \(\#41631\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f73d6fe4ce1cd9c01220da77e071f1f0c12cccbe)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f73d6fe4ce1cd9c01220da77e071f1f0c12cccbe

Requested commit: f73d6fe4ce1cd9c01220da77e071f1f0c12cccbe

Commit: f73d6fe4ce1cd9c01220da77e071f1f0c12cccbe

Tree: f68e3dbb49fc3db9d51abbfd82b4ef897465506a

Author: Lukas Wirth

Committer: GitHub

## Message

```
terminal: Kill the terminal child process, not the terminal process on exit (#41631)

When rerunning a task, our process id fetching seems to sometimes return
the previous terminal's process id when respawning the task, causing us
to kill the new terminal once the previous one drops as we spawn a new
one, then drop the old one. This results in rerun sometimes spawning a
blank task as the terminal immediately exits. The fix here is simple, we
actually want to kill the process running inside the terminal process,
not the terminal process itself when we exit in the terminal.

No relnotes as this was introduced yesterday in
https://github.com/zed-industries/zed/pull/41562

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

- [c6d61870e2a685d3f402d7c2dd39b3d9740e4292](https://git.cafe/gitcafe/zed/commit/c6d61870e2a685d3f402d7c2dd39b3d9740e4292?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f73d6fe4ce1cd9c01220da77e071f1f0c12cccbe?format=markdown)
