Switch window pane pipe redirect fd over to a bufferevent.

This commit is contained in:
Nicholas Marriott
2009-11-04 22:02:38 +00:00
parent 7342615c7d
commit 91ad830c88
4 changed files with 25 additions and 28 deletions

View File

@@ -55,16 +55,6 @@ server_window_prepare(void)
event_set(&wp->event,
wp->fd, events, server_window_callback, wp);
event_add(&wp->event, NULL);
if (wp->pipe_fd == -1)
continue;
events = 0;
if (BUFFER_USED(wp->pipe_buf) > 0)
events |= EV_WRITE;
event_del(&wp->pipe_event);
event_set(&wp->pipe_event,
wp->pipe_fd, events, server_window_callback, wp);
event_add(&wp->pipe_event, NULL);
}
}
}
@@ -110,14 +100,6 @@ server_window_callback(int fd, short events, void *data)
} else
window_pane_parse(wp);
}
if (fd == wp->pipe_fd) {
if (buffer_poll(fd, events, NULL, wp->pipe_buf) != 0) {
buffer_destroy(wp->pipe_buf);
close(wp->pipe_fd);
wp->pipe_fd = -1;
}
}
}
/* Window functions that need to happen every loop. */