summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-30 16:16:19 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-30 16:16:19 +0000
commit479d614884f66e9fa11f1292a2ef36991da46c1d (patch)
treec9bac93767d7dc741dfa5b047ceb248ff9af56ed /client.c
parent071494d8faff83287088bbdcc38db1414c0123b9 (diff)
Tell the server when the client gets SIGTERM so it can clean up the terminal
properly, rather than just exiting.
Diffstat (limited to 'client.c')
-rw-r--r--client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c
index f29c2569..e8785359 100644
--- a/client.c
+++ b/client.c
@@ -143,7 +143,9 @@ client_main(struct client_ctx *cctx)
logfile("client");
- while (!sigterm) {
+ for (;;) {
+ if (sigterm)
+ client_write_server(cctx, MSG_EXITING, NULL, 0);
if (sigchld) {
waitpid(WAIT_ANY, NULL, WNOHANG);
sigchld = 0;