Files
ghostty/src/os
Mitchell Hashimoto 4c3db76733 fix: always wait on open command to avoid defunct processes (#7657)
Without waiting on the xdg-open process on linux/freebsd, we end up with
a defunct (zombie) process after each time we open a URL.

For example, after click on two URLs in a ghostty, here is the output of
`ps ux | grep xdg-open`:

```
pbui      8364  0.0  0.0      0     0 tty7     Z+   05:03   0:00 [xdg-open] <defunct>
pbui      8453  0.0  0.0      0     0 tty7     Z+   05:03   0:00 [xdg-open] <defunct>
```

Perhaps we should revisit 695bc30, which removed the wait in the first
place. On my machine running Alpine Linux 3.22, `xdg-open` does not stay
alive and finishes immediately, thus making it safe to call wait (and
not block). This is also the case on my other machine running Ubuntu
24.04: `xdg-open` launches the URL in a browser and terminates
immediately.

Either way, this process must be waited upon eventually. Otherwise, we
will accumulate a collection of defunct processes until the terminal
itself terminates.
2025-06-24 08:08:31 -04:00
..
2024-08-16 10:57:19 -07:00
2025-05-26 21:50:14 -06:00
2025-06-21 14:11:50 -07:00
2025-03-12 16:29:17 -07:00
2025-06-07 14:34:55 -05:00
2025-06-21 14:11:50 -07:00
2025-06-14 16:26:03 -04:00
2025-06-21 14:11:50 -07:00
2024-01-14 14:48:56 -08:00
2025-03-12 15:46:15 -07:00
2025-03-12 16:29:17 -07:00