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.
This commit is contained in:
Nicholas Marriott
2009-08-11 22:34:17 +00:00
parent 4310282a4c
commit e0a19abb99
2 changed files with 4 additions and 0 deletions

1
tty.c
View File

@ -49,6 +49,7 @@ tty_init(struct tty *tty, int fd, char *path, char *term)
{
tty->path = xstrdup(path);
tty->fd = fd;
tty->log_fd = -1;
if (term == NULL || *term == '\0')
tty->termname = xstrdup("unknown");