debugger: Make sure debuggees are killed when quitting Zed (#32186)

Closes #31373 

We kill the DAP process in our `on_app_quit` handler, but the debuggee
might not be killed. Try to make this more reliable by making the DAP
process its own process group leader, and killing that entire process
group when quitting Zed.

I also considered going through the normal DAP shutdown sequence here,
but that seems dicey in a quit handler. There's also the DAP
`ProcessEvent` but it seems we can't rely on that as e.g. the JS DAP
doesn't send it.

Release Notes:

- Debugger Beta: Fixed debuggee processes not getting cleaned up when
quitting Zed.
This commit is contained in:
Cole Miller 2025-06-11 01:23:38 -04:00 committed by GitHub
parent fc4ca346be
commit 6c0ea88f5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 88 additions and 32 deletions

1
Cargo.lock generated
View file

@ -4027,6 +4027,7 @@ dependencies = [
"gpui",
"http_client",
"language",
"libc",
"log",
"node_runtime",
"parking_lot",