aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-11 22:34:17 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-11 22:34:17 +0000
commite0a19abb99aebcee544c451ff5e99f6a59d42d0c (patch)
tree110224661ebd7e160076f8d43ff626c39afbe924 /server.c
parent4310282a4c52f1885ae2eb80b106c9c03564a0b8 (diff)
downloadrtmux-e0a19abb99aebcee544c451ff5e99f6a59d42d0c.tar.gz
rtmux-e0a19abb99aebcee544c451ff5e99f6a59d42d0c.tar.bz2
rtmux-e0a19abb99aebcee544c451ff5e99f6a59d42d0c.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 'server.c')
-rw-r--r--server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server.c b/server.c
index 15a5fc94..eb8843f5 100644
--- a/server.c
+++ b/server.c
@@ -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);