diff options
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD$ */ +/* $Id$ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -237,7 +237,9 @@ client_main(int argc, char **argv, int flags) } /* Set process title, log and signals now this is the client. */ +#ifdef HAVE_SETPROCTITLE setproctitle("client (%s)", socket_path); +#endif logfile("client"); /* Create imsg. */ @@ -257,7 +259,9 @@ client_main(int argc, char **argv, int flags) cfmakeraw(&tio); tio.c_iflag = ICRNL|IXANY; tio.c_oflag = OPOST|ONLCR; +#ifdef NOKERNINFO tio.c_lflag = NOKERNINFO; +#endif tio.c_cflag = CREAD|CS8|HUPCL; tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; @@ -345,6 +349,10 @@ client_send_identify(int flags) fd = open("/", O_RDONLY); client_write_one(MSG_IDENTIFY_CWD, fd, NULL, 0); +#ifdef __CYGWIN__ + snprintf(&data.ttyname, sizeof data.ttyname, "%s", + ttyname(STDIN_FILENO)); +#else if ((fd = dup(STDIN_FILENO)) == -1) fatal("dup failed"); client_write_one(MSG_IDENTIFY_STDIN, fd, NULL, 0); |