diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-30 16:16:20 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-07-30 16:16:20 +0000 |
commit | c35ab0a285eb57ac1d66e22b7890d77060f3eb2d (patch) | |
tree | 92ba1c64ec2739adb00965a9335e81b7fd6d6054 | |
parent | 9dc2c07159d319856b5fc0cc9a4fb20ab0f55657 (diff) |
Tell the server when the client gets SIGTERM so it can clean up the terminal
properly, rather than just exiting.
-rw-r--r-- | usr.bin/tmux/client.c | 6 |
1 files 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 <nicm@users.sourceforge.net> @@ -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; |