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

Diff for /src/usr.bin/tmux/server-fn.c between version 1.111 and 1.112

version 1.111, 2017/08/29 09:18:48 version 1.112, 2017/10/12 11:32:27
Line 18 
Line 18 
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/queue.h>  #include <sys/queue.h>
   #include <sys/wait.h>
 #include <sys/uio.h>  #include <sys/uio.h>
   
 #include <imsg.h>  #include <imsg.h>
Line 278 
Line 279 
 server_destroy_pane(struct window_pane *wp, int notify)  server_destroy_pane(struct window_pane *wp, int notify)
 {  {
         struct window           *w = wp->window;          struct window           *w = wp->window;
         int                      old_fd;  
         struct screen_write_ctx  ctx;          struct screen_write_ctx  ctx;
         struct grid_cell         gc;          struct grid_cell         gc;
           time_t                   t;
           char                     tim[26];
   
         old_fd = wp->fd;  
         if (wp->fd != -1) {          if (wp->fd != -1) {
                 bufferevent_free(wp->event);                  bufferevent_free(wp->event);
                 close(wp->fd);                  close(wp->fd);
Line 290 
Line 291 
         }          }
   
         if (options_get_number(w->options, "remain-on-exit")) {          if (options_get_number(w->options, "remain-on-exit")) {
                 if (old_fd == -1)                  if (~wp->flags & PANE_STATUSREADY)
                         return;                          return;
   
                   if (wp->flags & PANE_STATUSDRAWN)
                           return;
                   wp->flags |= PANE_STATUSDRAWN;
   
                 if (notify)                  if (notify)
                         notify_pane("pane-died", wp);                          notify_pane("pane-died", wp);
   
Line 301 
Line 306 
                 screen_write_cursormove(&ctx, 0, screen_size_y(ctx.s) - 1);                  screen_write_cursormove(&ctx, 0, screen_size_y(ctx.s) - 1);
                 screen_write_linefeed(&ctx, 1, 8);                  screen_write_linefeed(&ctx, 1, 8);
                 memcpy(&gc, &grid_default_cell, sizeof gc);                  memcpy(&gc, &grid_default_cell, sizeof gc);
                 gc.attr |= GRID_ATTR_BRIGHT;  
                 screen_write_puts(&ctx, &gc, "Pane is dead");                  time(&t);
                   ctime_r(&t, tim);
   
                   if (WIFEXITED(wp->status)) {
                           screen_write_nputs(&ctx, -1, &gc,
                               "Pane is dead (status %d, %s)",
                               WEXITSTATUS(wp->status),
                               tim);
                   } else if (WIFSIGNALED(wp->status)) {
                           screen_write_nputs(&ctx, -1, &gc,
                               "Pane is dead (signal %d, %s)",
                               WTERMSIG(wp->status),
                               tim);
                   }
   
                 screen_write_stop(&ctx);                  screen_write_stop(&ctx);
                 wp->flags |= PANE_REDRAW;                  wp->flags |= PANE_REDRAW;
   
                 return;                  return;
         }          }
   

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112