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

Diff for /src/usr.bin/tmux/tmux.c between version 1.139 and 1.140

version 1.139, 2015/08/30 22:19:07 version 1.140, 2015/08/30 22:40:25
Line 46 
Line 46 
 int              debug_level;  int              debug_level;
 time_t           start_time;  time_t           start_time;
 char             socket_path[PATH_MAX];  char             socket_path[PATH_MAX];
 int              login_shell;  
 char            *environ_path;  char            *environ_path;
   
 __dead void      usage(void);  __dead void      usage(void);
Line 170 
Line 169 
         }          }
 }  }
   
 __dead void  
 shell_exec(const char *shell, const char *shellcmd)  
 {  
         const char      *shellname, *ptr;  
         char            *argv0;  
   
         ptr = strrchr(shell, '/');  
         if (ptr != NULL && *(ptr + 1) != '\0')  
                 shellname = ptr + 1;  
         else  
                 shellname = shell;  
         if (login_shell)  
                 xasprintf(&argv0, "-%s", shellname);  
         else  
                 xasprintf(&argv0, "%s", shellname);  
         setenv("SHELL", shell, 1);  
   
         setblocking(STDIN_FILENO, 1);  
         setblocking(STDOUT_FILENO, 1);  
         setblocking(STDERR_FILENO, 1);  
         closefrom(STDERR_FILENO + 1);  
   
         execl(shell, argv0, "-c", shellcmd, (char *) NULL);  
         fatal("execl failed");  
 }  
   
 const char *  const char *
 find_home(void)  find_home(void)
 {  {
Line 229 
Line 202 
   
         setlocale(LC_TIME, "");          setlocale(LC_TIME, "");
   
         flags = 0;          if (**argv == '-')
                   flags = CLIENT_LOGIN;
           else
                   flags = 0;
   
         label = path = NULL;          label = path = NULL;
         login_shell = (**argv == '-');  
         while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) {          while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) {
                 switch (opt) {                  switch (opt) {
                 case '2':                  case '2':
Line 252 
Line 228 
                         cfg_file = xstrdup(optarg);                          cfg_file = xstrdup(optarg);
                         break;                          break;
                 case 'l':                  case 'l':
                         login_shell = 1;                          flags |= CLIENT_LOGIN;
                         break;                          break;
                 case 'L':                  case 'L':
                         free(label);                          free(label);

Legend:
Removed from v.1.139  
changed lines
  Added in v.1.140