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

Diff for /src/usr.bin/tmux/window.c between version 1.20 and 1.21

version 1.20, 2009/08/12 09:14:25 version 1.21, 2009/08/13 19:04:00
Line 269 
Line 269 
   
 struct window *  struct window *
 window_create(const char *name, const char *cmd, const char *cwd,  window_create(const char *name, const char *cmd, const char *cwd,
     struct environ *env, u_int sx, u_int sy, u_int hlimit, char **cause)      struct environ *env, struct termios *tio, u_int sx, u_int sy, u_int hlimit,
       char **cause)
 {  {
         struct window           *w;          struct window           *w;
         struct window_pane      *wp;          struct window_pane      *wp;
Line 277 
Line 278 
         w = window_create1(sx, sy);          w = window_create1(sx, sy);
         wp = window_add_pane(w, hlimit);          wp = window_add_pane(w, hlimit);
         layout_init(w);          layout_init(w);
         if (window_pane_spawn(wp, cmd, cwd, env, cause) != 0) {          if (window_pane_spawn(wp, cmd, cwd, env, tio, cause) != 0) {
                 window_destroy(w);                  window_destroy(w);
                 return (NULL);                  return (NULL);
         }          }
Line 470 
Line 471 
 }  }
   
 int  int
 window_pane_spawn(struct window_pane *wp,  window_pane_spawn(struct window_pane *wp, const char *cmd,
     const char *cmd, const char *cwd, struct environ *env, char **cause)      const char *cwd, struct environ *env, struct termios *tio, char **cause)
 {  {
         struct winsize           ws;          struct winsize           ws;
         int                      mode;          int                      mode;
Line 505 
Line 506 
         tv.tv_usec = NAME_INTERVAL * 1000L;          tv.tv_usec = NAME_INTERVAL * 1000L;
         timeradd(&wp->window->name_timer, &tv, &wp->window->name_timer);          timeradd(&wp->window->name_timer, &tv, &wp->window->name_timer);
   
         switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) {          switch (wp->pid = forkpty(&wp->fd, wp->tty, tio, &ws)) {
         case -1:          case -1:
                 wp->fd = -1;                  wp->fd = -1;
                 xasprintf(cause, "%s: %s", cmd, strerror(errno));                  xasprintf(cause, "%s: %s", cmd, strerror(errno));

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21