diff options
author | 2009-07-30 16:16:19 +0000 | |
---|---|---|
committer | 2009-07-30 16:16:19 +0000 | |
commit | 6dc9c947a5bc7fefa2438f598f4c2b40173251ed (patch) | |
tree | 3a62902088a2675541ca25019af092adf648e869 | |
parent | add missing " when printing an error string. ok henning@ (diff) | |
download | wireguard-openbsd-6dc9c947a5bc7fefa2438f598f4c2b40173251ed.tar.xz wireguard-openbsd-6dc9c947a5bc7fefa2438f598f4c2b40173251ed.zip |
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; |