aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-14 21:24:46 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-14 21:24:46 +0000
commit7f77c395e38b35efa757f83037a051fea0fcd27d (patch)
tree192d5e3e07a400d44bd47aad51c02b8c51cf6579 /server.c
parente2a18894b34e3651feecba1dd43c4f05c9566509 (diff)
downloadrtmux-7f77c395e38b35efa757f83037a051fea0fcd27d.tar.gz
rtmux-7f77c395e38b35efa757f83037a051fea0fcd27d.tar.bz2
rtmux-7f77c395e38b35efa757f83037a051fea0fcd27d.zip
Sync OpenBSD patchset 247:
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.c b/server.c
index 2134ea26..9ab635f9 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.168 2009-08-14 21:17:54 tcunha Exp $ */
+/* $Id: server.c,v 1.169 2009-08-14 21:24:46 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -109,6 +109,7 @@ server_create_client(int fd)
}
}
ARRAY_ADD(&clients, c);
+ log_debug("new client %d", fd);
}
/* Find client index. */
@@ -260,6 +261,7 @@ server_main(int srv_fd)
time_t now, last;
siginit();
+ log_debug("server socket is %d", srv_fd);
last = time(NULL);
@@ -906,6 +908,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);