From c35ab0a285eb57ac1d66e22b7890d77060f3eb2d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 30 Jul 2009 16:16:20 +0000 Subject: Tell the server when the client gets SIGTERM so it can clean up the terminal properly, rather than just exiting. --- usr.bin/tmux/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 4547b40e194..f8509ebb33b 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.7 2009/07/26 12:58:44 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.8 2009/07/30 16:16:19 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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; -- cgit v1.2.3