aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-03-04 08:52:41 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-03-04 08:52:41 +0000
commit208881a735669d854b132629eedb463ea9c01420 (patch)
tree2d836b2dbb57b2e67106972e7ad1c2baad65eb0b /client.c
parenta2f52d422418af489e8eeb386d989b848a09891b (diff)
downloadrtmux-208881a735669d854b132629eedb463ea9c01420.tar.gz
rtmux-208881a735669d854b132629eedb463ea9c01420.tar.bz2
rtmux-208881a735669d854b132629eedb463ea9c01420.zip
Send DSC 1000p at the beginning of a -CC client's lifetime and ST and the end,
from George Nachman..
Diffstat (limited to 'client.c')
-rw-r--r--client.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/client.c b/client.c
index 582b44bf..5b227b44 100644
--- a/client.c
+++ b/client.c
@@ -296,8 +296,16 @@ client_main(int argc, char **argv, int flags)
ppid = getppid();
if (client_exittype == MSG_DETACHKILL && ppid > 1)
kill(ppid, SIGHUP);
- } else if (flags & IDENTIFY_TERMIOS)
+ } else if (flags & IDENTIFY_TERMIOS) {
+ if (flags & IDENTIFY_CONTROL) {
+ if (client_exitreason != CLIENT_EXIT_NONE)
+ printf("%%exit %s\n", client_exit_message());
+ else
+ printf("%%exit\n");
+ printf("\033\\");
+ }
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &saved_tio);
+ }
setblocking(STDIN_FILENO, 1);
return (client_exitval);
}