Major reorganisation of screen handling.

This commit is contained in:
Nicholas Marriott
2007-12-06 09:46:23 +00:00
parent 6f142e9ac6
commit 103748d6ad
52 changed files with 2084 additions and 1538 deletions

View File

@@ -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);