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

Diff for /src/usr.bin/tmux/server.c between version 1.115 and 1.116

version 1.115, 2014/07/21 10:52:48 version 1.116, 2014/09/01 21:58:41
Line 217 
Line 217 
 int  int
 server_should_shutdown(void)  server_should_shutdown(void)
 {  {
         u_int   i;          struct client   *c;
           u_int            i;
   
         if (!options_get_number(&global_options, "exit-unattached")) {          if (!options_get_number(&global_options, "exit-unattached")) {
                 if (!RB_EMPTY(&sessions))                  if (!RB_EMPTY(&sessions))
                         return (0);                          return (0);
         }          }
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                   c = ARRAY_ITEM(&clients, i);
                   if (c != NULL && c->session != NULL)
                           return (0);
           }
   
           /*
            * No attached clients therefore want to exit - flush any waiting
            * clients but don't actually exit until they've gone.
            */
           cmd_wait_for_flush();
           for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                 if (ARRAY_ITEM(&clients, i) != NULL)                  if (ARRAY_ITEM(&clients, i) != NULL)
                         return (0);                          return (0);
         }          }
   
         return (1);          return (1);
 }  }
   
Line 237 
Line 251 
         struct client   *c;          struct client   *c;
         struct session  *s, *next_s;          struct session  *s, *next_s;
         u_int            i;          u_int            i;
   
           cmd_wait_for_flush();
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                 c = ARRAY_ITEM(&clients, i);                  c = ARRAY_ITEM(&clients, i);

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