mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-18 01:20:17 +02:00
Major reorganisation of screen handling.
This commit is contained in:
8
server.c
8
server.c
@@ -1,4 +1,4 @@
|
||||
/* $Id: server.c,v 1.43 2007-12-04 20:25:17 nicm Exp $ */
|
||||
/* $Id: server.c,v 1.44 2007-12-06 09:46:23 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@@ -107,7 +107,7 @@ server_start(const char *path)
|
||||
if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1)
|
||||
fatal("fcntl failed");
|
||||
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
|
||||
fatal("fcntl failed");
|
||||
fatal("fcntl failed");
|
||||
|
||||
if (daemon(1, 1) != 0)
|
||||
fatal("daemon failed");
|
||||
@@ -231,7 +231,7 @@ server_handle_windows(struct pollfd **pfd)
|
||||
if ((w = ARRAY_ITEM(&windows, i)) != NULL) {
|
||||
if (buffer_poll(*pfd, w->in, w->out) != 0)
|
||||
server_lost_window(w);
|
||||
else
|
||||
else
|
||||
server_handle_window(w);
|
||||
}
|
||||
(*pfd)++;
|
||||
@@ -371,7 +371,7 @@ server_lost_client(struct client *c)
|
||||
if (ARRAY_ITEM(&clients, i) == c)
|
||||
ARRAY_SET(&clients, i, NULL);
|
||||
}
|
||||
|
||||
|
||||
tty_free(&c->tty);
|
||||
|
||||
close(c->fd);
|
||||
|
Reference in New Issue
Block a user