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

Diff for /src/usr.bin/tmux/cmd-new-session.c between version 1.10 and 1.11

version 1.10, 2009/08/08 21:52:43 version 1.11, 2009/08/13 19:03:59
Line 18 
Line 18 
   
 #include <sys/types.h>  #include <sys/types.h>
   
   #include <string.h>
   #include <termios.h>
   
   #define TTYDEFCHARS
   #include <sys/ttydefaults.h>
   
 #include "tmux.h"  #include "tmux.h"
   
 /*  /*
Line 109 
Line 115 
         struct cmd_new_session_data     *data = self->data;          struct cmd_new_session_data     *data = self->data;
         struct session                  *s;          struct session                  *s;
         struct environ                   env;          struct environ                   env;
           struct termios                   tio;
         const char                      *update;          const char                      *update;
         char                            *overrides, *cmd, *cwd, *cause;          char                            *overrides, *cmd, *cwd, *cause;
         int                              detached;          int                              detached;
Line 192 
Line 199 
         if (ctx->cmdclient != NULL)          if (ctx->cmdclient != NULL)
                 environ_update(update, &ctx->cmdclient->environ, &env);                  environ_update(update, &ctx->cmdclient->environ, &env);
   
           /*
            * Fill in the termios settings used for new windows in this session;
            * if there is a command client, use the control characters from it.
            */
           if (ctx->cmdclient != NULL && ctx->cmdclient->tty.fd != -1) {
                   if (tcgetattr(ctx->cmdclient->tty.fd, &tio) != 0)
                           fatal("tcgetattr failed");
           } else
                   memcpy(tio.c_cc, ttydefchars, sizeof tio.c_cc);
           tio.c_iflag = TTYDEF_IFLAG;
           tio.c_oflag = TTYDEF_OFLAG;
           tio.c_lflag = TTYDEF_LFLAG;
           tio.c_cflag = TTYDEF_CFLAG;
           tio.c_ispeed = TTYDEF_SPEED;
           tio.c_ospeed = TTYDEF_SPEED;
   
         /* Create the new session. */          /* Create the new session. */
         s = session_create(data->newname, cmd, cwd, &env, sx, sy, &cause);          s = session_create(data->newname, cmd, cwd, &env, &tio, sx, sy, &cause);
         if (s == NULL) {          if (s == NULL) {
                 ctx->error(ctx, "create session failed: %s", cause);                  ctx->error(ctx, "create session failed: %s", cause);
                 xfree(cause);                  xfree(cause);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11