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

@ -723,6 +723,7 @@ struct terminal {
bool client_has_terminated;
int terminate_timeout_fd;
int exit_status;
int next_signal;
void (*cb)(void *data, int exit_code);
void *cb_data;