[BACK]Return to client.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/client.c between version 1.114 and 1.115

version 1.114, 2016/10/03 22:52:11 version 1.115, 2017/01/13 10:12:12
Line 51 
Line 51 
 static int               client_exitval;  static int               client_exitval;
 static enum msgtype      client_exittype;  static enum msgtype      client_exittype;
 static const char       *client_exitsession;  static const char       *client_exitsession;
   static const char       *client_execshell;
   static const char       *client_execcmd;
 static int               client_attached;  static int               client_attached;
   
 static __dead void       client_exec(const char *,const char *);  static __dead void       client_exec(const char *,const char *);
Line 358 
Line 360 
         /* Start main loop. */          /* Start main loop. */
         proc_loop(client_proc, NULL);          proc_loop(client_proc, NULL);
   
           /* Run command if user requested exec, instead of exiting. */
           if (client_exittype == MSG_EXEC) {
                   if (client_flags & CLIENT_CONTROLCONTROL)
                           tcsetattr(STDOUT_FILENO, TCSAFLUSH, &saved_tio);
                   clear_signals(0);
                   client_exec(client_execshell, client_execcmd);
           }
   
         /* Print the exit message, if any, and exit. */          /* Print the exit message, if any, and exit. */
         if (client_attached) {          if (client_attached) {
                 if (client_exitreason != CLIENT_EXIT_NONE)                  if (client_exitreason != CLIENT_EXIT_NONE)
Line 653 
Line 663 
                         client_exitreason = CLIENT_EXIT_DETACHED_HUP;                          client_exitreason = CLIENT_EXIT_DETACHED_HUP;
                 else                  else
                         client_exitreason = CLIENT_EXIT_DETACHED;                          client_exitreason = CLIENT_EXIT_DETACHED;
                   proc_send(client_peer, MSG_EXITING, -1, NULL, 0);
                   break;
           case MSG_EXEC:
                   if (datalen == 0 || data[datalen - 1] != '\0' ||
                       strlen(data) + 1 == (size_t)datalen)
                           fatalx("bad MSG_EXEC string");
                   client_execcmd = xstrdup(data);
                   client_execshell = xstrdup(data + strlen(data) + 1);
   
                   client_exittype = imsg->hdr.type;
                 proc_send(client_peer, MSG_EXITING, -1, NULL, 0);                  proc_send(client_peer, MSG_EXITING, -1, NULL, 0);
                 break;                  break;
         case MSG_EXIT:          case MSG_EXIT:

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115