version 1.17, 2011/01/04 00:42:47 |
version 1.18, 2011/01/08 01:52:36 |
|
|
struct client *c; |
struct client *c; |
struct window_pane *wp; |
struct window_pane *wp; |
char *command; |
char *command; |
int old_fd, pipe_fd[2], null_fd, mode; |
int old_fd, pipe_fd[2], null_fd; |
|
|
if ((c = cmd_find_client(ctx, NULL)) == NULL) |
if ((c = cmd_find_client(ctx, NULL)) == NULL) |
return (-1); |
return (-1); |
|
|
NULL, NULL, cmd_pipe_pane_error_callback, wp); |
NULL, NULL, cmd_pipe_pane_error_callback, wp); |
bufferevent_enable(wp->pipe_event, EV_WRITE); |
bufferevent_enable(wp->pipe_event, EV_WRITE); |
|
|
if ((mode = fcntl(wp->pipe_fd, F_GETFL)) == -1) |
setblocking(wp->pipe_fd, 0); |
fatal("fcntl failed"); |
|
if (fcntl(wp->pipe_fd, F_SETFL, mode|O_NONBLOCK) == -1) |
|
fatal("fcntl failed"); |
|
return (0); |
return (0); |
} |
} |
} |
} |