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

Diff for /src/usr.bin/tmux/session.c between version 1.40 and 1.41

version 1.40, 2013/10/10 11:58:24 version 1.41, 2013/10/10 12:26:36
Line 85 
Line 85 
   
 /* Create a new session. */  /* Create a new session. */
 struct session *  struct session *
 session_create(const char *name, const char *cmd, const char *cwd,  session_create(const char *name, const char *cmd, int cwd, struct environ *env,
     struct environ *env, struct termios *tio, int idx, u_int sx, u_int sy,      struct termios *tio, int idx, u_int sx, u_int sy, char **cause)
     char **cause)  
 {  {
         struct session  *s;          struct session  *s;
   
Line 99 
Line 98 
                 fatal("gettimeofday failed");                  fatal("gettimeofday failed");
         session_update_activity(s);          session_update_activity(s);
   
         s->cwd = xstrdup(cwd);          s->cwd = dup(cwd);
   
         s->curw = NULL;          s->curw = NULL;
         TAILQ_INIT(&s->lastw);          TAILQ_INIT(&s->lastw);
Line 171 
Line 170 
                 winlink_remove(&s->windows, wl);                  winlink_remove(&s->windows, wl);
         }          }
   
         free(s->cwd);          close(s->cwd);
   
         RB_INSERT(sessions, &dead_sessions, s);          RB_INSERT(sessions, &dead_sessions, s);
 }  }
Line 227 
Line 226 
   
 /* Create a new window on a session. */  /* Create a new window on a session. */
 struct winlink *  struct winlink *
 session_new(struct session *s,  session_new(struct session *s, const char *name, const char *cmd, int cwd,
     const char *name, const char *cmd, const char *cwd, int idx, char **cause)      int idx, char **cause)
 {  {
         struct window   *w;          struct window   *w;
         struct winlink  *wl;          struct winlink  *wl;
Line 251 
Line 250 
                 shell = _PATH_BSHELL;                  shell = _PATH_BSHELL;
   
         hlimit = options_get_number(&s->options, "history-limit");          hlimit = options_get_number(&s->options, "history-limit");
         w = window_create(          w = window_create(name, cmd, shell, cwd, &env, s->tio, s->sx, s->sy,
             name, cmd, shell, cwd, &env, s->tio, s->sx, s->sy, hlimit, cause);              hlimit, cause);
         if (w == NULL) {          if (w == NULL) {
                 winlink_remove(&s->windows, wl);                  winlink_remove(&s->windows, wl);
                 environ_free(&env);                  environ_free(&env);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41