[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.182 and 1.183

version 1.182, 2018/08/18 20:08:52 version 1.183, 2018/08/23 15:45:05
Line 162 
Line 162 
     char *lockfile)      char *lockfile)
 {  {
         int              pair[2];          int              pair[2];
         struct job      *job;  
         sigset_t         set, oldset;          sigset_t         set, oldset;
         struct client   *c;          struct client   *c;
         char            *cause = NULL;          char            *cause = NULL;
Line 223 
Line 222 
         }          }
   
         start_cfg();          start_cfg();
   
         server_add_accept(0);          server_add_accept(0);
   
         proc_loop(server_proc, server_loop);          proc_loop(server_proc, server_loop);
   
         LIST_FOREACH(job, &all_jobs, entry) {          job_kill_all();
                 if (job->pid != -1)  
                         kill(job->pid, SIGTERM);  
         }  
   
         status_prompt_save_history();          status_prompt_save_history();
   
         exit(0);          exit(0);
 }  }
   
Line 243 
Line 238 
 {  {
         struct client   *c;          struct client   *c;
         u_int            items;          u_int            items;
         struct job      *job;  
   
         do {          do {
                 items = cmdq_next(NULL);                  items = cmdq_next(NULL);
Line 276 
Line 270 
         if (!TAILQ_EMPTY(&clients))          if (!TAILQ_EMPTY(&clients))
                 return (0);                  return (0);
   
         LIST_FOREACH(job, &all_jobs, entry) {          if (job_still_running())
                 if ((~job->flags & JOB_NOWAIT) && job->state == JOB_RUNNING)                  return (0);
                         return (0);  
         }  
   
         return (1);          return (1);
 }  }
Line 457 
Line 449 
 {  {
         struct window           *w, *w1;          struct window           *w, *w1;
         struct window_pane      *wp;          struct window_pane      *wp;
         struct job              *job;  
   
         RB_FOREACH_SAFE(w, windows, &windows, w1) {          RB_FOREACH_SAFE(w, windows, &windows, w1) {
                 TAILQ_FOREACH(wp, &w->panes, entry) {                  TAILQ_FOREACH(wp, &w->panes, entry) {
Line 474 
Line 465 
                         }                          }
                 }                  }
         }          }
           job_check_died(pid, status);
         LIST_FOREACH(job, &all_jobs, entry) {  
                 if (pid == job->pid) {  
                         job_died(job, status);  /* might free job */  
                         break;  
                 }  
         }  
 }  }
   
 /* Handle stopped children. */  /* Handle stopped children. */

Legend:
Removed from v.1.182  
changed lines
  Added in v.1.183