term: send SIGHUP before SIGTERM when shutting down

If we're the ones initiating shutdown, start by sending SIGHUP. Only
if the client application does not terminate, send SIGTERM (and if it
still refuses to terminate, send SIGKILL).

Also reduce the timeout between the signals from 60s to 30s.
This commit is contained in:
Daniel Eklöf 2024-04-05 16:27:56 +02:00
parent c7848c4e75
commit 7f4328e0b1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 61 additions and 13 deletions

View file

@ -61,6 +61,9 @@
* Regression: terminal shutting down when the PTY is closed by the
client application, which may be earlier than when the client
application exits ([#1666][1666]).
* When closing the window, send `SIGHUP` to the client application,
before sending `SIGTERM`. The signal sequence is now `SIGHUP`, wait,
`SIGTERM`, wait `SIGKILL`.
[1666]: https://codeberg.org/dnkl/foot/issues/1666