From 479d614884f66e9fa11f1292a2ef36991da46c1d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 30 Jul 2009 16:16:19 +0000 Subject: [PATCH] Tell the server when the client gets SIGTERM so it can clean up the terminal properly, rather than just exiting. --- client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;