=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-pipe-pane.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/tmux/cmd-pipe-pane.c 2011/01/04 00:42:47 1.17 +++ src/usr.bin/tmux/cmd-pipe-pane.c 2011/01/08 01:52:36 1.18 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-pipe-pane.c,v 1.17 2011/01/04 00:42:47 nicm Exp $ */ +/* $OpenBSD: cmd-pipe-pane.c,v 1.18 2011/01/08 01:52:36 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -53,7 +53,7 @@ struct client *c; struct window_pane *wp; 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) return (-1); @@ -127,10 +127,7 @@ NULL, NULL, cmd_pipe_pane_error_callback, wp); bufferevent_enable(wp->pipe_event, EV_WRITE); - if ((mode = fcntl(wp->pipe_fd, F_GETFL)) == -1) - fatal("fcntl failed"); - if (fcntl(wp->pipe_fd, F_SETFL, mode|O_NONBLOCK) == -1) - fatal("fcntl failed"); + setblocking(wp->pipe_fd, 0); return (0); } }