diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-04 22:02:39 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-04 22:02:39 +0000 |
commit | 4d0bbc1e01f1fde69f49b0be9924ff8916650505 (patch) | |
tree | b02f1fd2c832c76847d276485b7aa1fdda4f10f5 /usr.bin/tmux/window.c | |
parent | 61f1e016a392ec594bd75c723836afda9e8af879 (diff) |
Switch window pane pipe redirect fd over to a bufferevent.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r-- | usr.bin/tmux/window.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 90fec083417..2417f06dcc5 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.35 2009/11/04 20:50:11 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.36 2009/11/04 22:02:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -426,8 +426,8 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit) wp->sy = sy; wp->pipe_fd = -1; - wp->pipe_buf = NULL; wp->pipe_off = 0; + wp->pipe_event = NULL; wp->saved_grid = NULL; @@ -453,9 +453,8 @@ window_pane_destroy(struct window_pane *wp) grid_destroy(wp->saved_grid); if (wp->pipe_fd != -1) { - buffer_destroy(wp->pipe_buf); close(wp->pipe_fd); - event_del(&wp->pipe_event); + bufferevent_free(wp->pipe_event); } buffer_destroy(wp->in); @@ -639,7 +638,7 @@ window_pane_parse(struct window_pane *wp) new_size = BUFFER_USED(wp->in) - wp->pipe_off; if (wp->pipe_fd != -1 && new_size > 0) - buffer_write(wp->pipe_buf, BUFFER_OUT(wp->in), new_size); + bufferevent_write(wp->pipe_event, BUFFER_OUT(wp->in), new_size); input_parse(wp); |