[BACK]Return to cmd-pipe-pane.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-pipe-pane.c between version 1.38 and 1.39

version 1.38, 2016/10/14 22:14:22 version 1.39, 2016/10/16 19:04:05
Line 33 
Line 33 
  * Open pipe to redirect pane output. If already open, close first.   * Open pipe to redirect pane output. If already open, close first.
  */   */
   
 static enum cmd_retval   cmd_pipe_pane_exec(struct cmd *, struct cmd_q *);  static enum cmd_retval  cmd_pipe_pane_exec(struct cmd *, struct cmdq_item *);
   
 static void cmd_pipe_pane_error_callback(struct bufferevent *, short, void *);  static void cmd_pipe_pane_error_callback(struct bufferevent *, short, void *);
   
Line 51 
Line 51 
 };  };
   
 static enum cmd_retval  static enum cmd_retval
 cmd_pipe_pane_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_pipe_pane_exec(struct cmd *self, struct cmdq_item *item)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct client           *c = cmdq->state.c;          struct client           *c = item->state.c;
         struct window_pane      *wp = cmdq->state.tflag.wp;          struct window_pane      *wp = item->state.tflag.wp;
         struct session          *s = cmdq->state.tflag.s;          struct session          *s = item->state.tflag.s;
         struct winlink          *wl = cmdq->state.tflag.wl;          struct winlink          *wl = item->state.tflag.wl;
         char                    *cmd;          char                    *cmd;
         int                      old_fd, pipe_fd[2], null_fd;          int                      old_fd, pipe_fd[2], null_fd;
         struct format_tree      *ft;          struct format_tree      *ft;
Line 85 
Line 85 
   
         /* Open the new pipe. */          /* Open the new pipe. */
         if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_fd) != 0) {          if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_fd) != 0) {
                 cmdq_error(cmdq, "socketpair error: %s", strerror(errno));                  cmdq_error(item, "socketpair error: %s", strerror(errno));
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
   
         /* Expand the command. */          /* Expand the command. */
         ft = format_create(cmdq, 0);          ft = format_create(item, 0);
         format_defaults(ft, c, s, wl, wp);          format_defaults(ft, c, s, wl, wp);
         cmd = format_expand_time(ft, args->argv[0], time(NULL));          cmd = format_expand_time(ft, args->argv[0], time(NULL));
         format_free(ft);          format_free(ft);
Line 98 
Line 98 
         /* Fork the child. */          /* Fork the child. */
         switch (fork()) {          switch (fork()) {
         case -1:          case -1:
                 cmdq_error(cmdq, "fork error: %s", strerror(errno));                  cmdq_error(item, "fork error: %s", strerror(errno));
   
                 free(cmd);                  free(cmd);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39