aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/client.c b/client.c
index 0c8657eb..b9e3b30a 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD$ */
+/* $Id$ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -225,7 +225,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. */
@@ -245,7 +247,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;
@@ -324,8 +328,13 @@ client_send_identify(int flags)
strlcpy(data.term, term, sizeof data.term) >= sizeof data.term)
*data.term = '\0';
+#ifdef __CYGWIN__
+ snprintf(&data.ttyname, sizeof data.ttyname, "%s",
+ ttyname(STDIN_FILENO));
+#else
if ((fd = dup(STDIN_FILENO)) == -1)
fatal("dup failed");
+#endif
imsg_compose(&client_ibuf,
MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data);
client_update_event();