diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-05-14 14:35:26 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-05-14 14:35:26 +0000 |
commit | 6694a018613fe2822e416a97b6433c2134e7723d (patch) | |
tree | 7150db141bc765f4f3c1e4084927d8f5b198e933 /client.c | |
parent | 9900e28ba88526eec3ba623ea1ebc94116257c97 (diff) | |
download | rtmux-6694a018613fe2822e416a97b6433c2134e7723d.tar.gz rtmux-6694a018613fe2822e416a97b6433c2134e7723d.tar.bz2 rtmux-6694a018613fe2822e416a97b6433c2134e7723d.zip |
Sync OpenBSD patchset 698:
Catch SIGHUP and terminate if running as a client. This prevents clients
from being left hanging around when, for example, a SSH session is
disconnected.
ok nicm@
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: client.c,v 1.91 2010-05-14 14:30:00 tcunha Exp $ */ +/* $Id: client.c,v 1.92 2010-05-14 14:35:26 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -210,6 +210,11 @@ client_signal(int sig, unused short events, unused void *data) struct sigaction sigact; switch (sig) { + case SIGHUP: + client_exitmsg = "lost tty"; + client_exitval = 1; + client_write_server(MSG_EXITING, NULL, 0); + break; case SIGTERM: client_exitmsg = "terminated"; client_exitval = 1; |