summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-07-30 20:50:10 +0000
committerTiago Cunha <tcunha@gmx.com>2009-07-30 20:50:10 +0000
commit817e93ac947226f83d7b2b8927fbec4cf6293d44 (patch)
treefc76f4aa39c8c1b6189d7519df0a5d49e16fac9f /client.c
parent1650b8552ff0eec77dde62066312bea60c1200ae (diff)
Sync OpenBSD patchset 201:
Tell the server when the client gets SIGTERM so it can clean up the terminal properly, rather than just exiting.
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client.c b/client.c
index a7afa80e..d7387453 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.57 2009-07-28 22:12:16 tcunha Exp $ */
+/* $Id: client.c,v 1.58 2009-07-30 20:50:10 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -147,7 +147,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;