summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;