[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.66 and 1.67

version 1.66, 2015/05/29 23:02:27 version 1.67, 2015/06/04 23:27:51
Line 41 
Line 41 
         "[-AdDP] [-c start-directory] [-F format] [-n window-name] "          "[-AdDP] [-c start-directory] [-F format] [-n window-name] "
         "[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] "          "[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] "
         "[-y height] [command]",          "[-y height] [command]",
         CMD_STARTSERVER|CMD_CANTNEST,          CMD_STARTSERVER,
         cmd_new_session_exec          cmd_new_session_exec
 };  };
   
Line 145 
Line 145 
         }          }
   
         /*          /*
          * Save the termios settings, part of which is used for new windows in           * If this is a new client, check for nesting and save the termios
          * this session.           * settings (part of which is used for new windows in this session).
          *           *
          * This is read again with tcgetattr() rather than using tty.tio as if           * tcgetattr() is used rather than using tty.tio since if the client is
          * detached, tty_open won't be called. Because of this, it must be done           * detached, tty_open won't be called. It must be done before opening
          * before opening the terminal as that calls tcsetattr() to prepare for           * the terminal as that calls tcsetattr() to prepare for tmux taking
          * tmux taking over.           * over.
          */           */
         if (!detached && !already_attached && c->tty.fd != -1) {          if (!detached && !already_attached && c->tty.fd != -1) {
                   if (server_client_check_nested(cmdq->client)) {
                           cmdq_error(cmdq, "sessions should be nested with care, "
                               "unset $TMUX to force");
                           return (CMD_RETURN_ERROR);
                   }
                 if (tcgetattr(c->tty.fd, &tio) != 0)                  if (tcgetattr(c->tty.fd, &tio) != 0)
                         fatal("tcgetattr failed");                          fatal("tcgetattr failed");
                 tiop = &tio;                  tiop = &tio;

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67