summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-08-11 22:34:17 +0000
committernicm <nicm@openbsd.org>2009-08-11 22:34:17 +0000
commit0bb39cd5a2ab55324ea6cefa9a34fc479e22db04 (patch)
tree91fdaba57f6ee2079754715635351627df6fcd30 /usr.bin/tmux/server.c
parentHave the client pass its stdin fd to the server when identifying itself and (diff)
downloadwireguard-openbsd-0bb39cd5a2ab55324ea6cefa9a34fc479e22db04.tar.xz
wireguard-openbsd-0bb39cd5a2ab55324ea6cefa9a34fc479e22db04.zip
Initialise log_fd to -1, prevents spurious disconnection of the client when it
ends up as fd 0 (likely if the server is started with "tmux start"). Also add some extra debugging messages to server.c.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r--usr.bin/tmux/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index c9e79389f6b..1af4027129d 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.19 2009/08/11 19:32:25 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.20 2009/08/11 22:34:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -110,6 +110,7 @@ server_create_client(int fd)
}
}
ARRAY_ADD(&clients, c);
+ log_debug("new client %d", fd);
}
/* Find client index. */
@@ -257,6 +258,7 @@ server_main(int srv_fd)
time_t now, last;
siginit();
+ log_debug("server socket is %d", srv_fd);
last = time(NULL);
@@ -901,6 +903,7 @@ server_lost_client(struct client *c)
if (ARRAY_ITEM(&clients, i) == c)
ARRAY_SET(&clients, i, NULL);
}
+ log_debug("lost client %d", c->ibuf.fd);
tty_free(&c->tty);