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

Diff for /src/usr.bin/tmux/client.c between version 1.161 and 1.162

version 1.161, 2023/07/10 12:00:08 version 1.162, 2024/05/15 09:59:12
Line 490 
Line 490 
 static __dead void  static __dead void
 client_exec(const char *shell, const char *shellcmd)  client_exec(const char *shell, const char *shellcmd)
 {  {
         const char      *name, *ptr;          char    *argv0;
         char            *argv0;  
   
         log_debug("shell %s, command %s", shell, shellcmd);          log_debug("shell %s, command %s", shell, shellcmd);
           argv0 = shell_argv0(shell, !!(client_flags & CLIENT_LOGIN));
         ptr = strrchr(shell, '/');  
         if (ptr != NULL && *(ptr + 1) != '\0')  
                 name = ptr + 1;  
         else  
                 name = shell;  
         if (client_flags & CLIENT_LOGIN)  
                 xasprintf(&argv0, "-%s", name);  
         else  
                 xasprintf(&argv0, "%s", name);  
         setenv("SHELL", shell, 1);          setenv("SHELL", shell, 1);
   
         proc_clear_signals(client_proc, 1);          proc_clear_signals(client_proc, 1);

Legend:
Removed from v.1.161  
changed lines
  Added in v.1.162