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

Diff for /src/usr.bin/tmux/spawn.c between version 1.30 and 1.31

version 1.30, 2022/05/30 13:06:41 version 1.31, 2022/08/10 14:03:59
Line 391 
Line 391 
          */           */
         if (chdir(new_wp->cwd) == 0)          if (chdir(new_wp->cwd) == 0)
                 environ_set(child, "PWD", 0, "%s", new_wp->cwd);                  environ_set(child, "PWD", 0, "%s", new_wp->cwd);
         else if ((tmp = find_home()) != NULL || chdir(tmp) == 0)          else if ((tmp = find_home()) != NULL && chdir(tmp) == 0)
                 environ_set(child, "PWD", 0, "%s", tmp);                  environ_set(child, "PWD", 0, "%s", tmp);
         else if (chdir("/") == 0)          else if (chdir("/") == 0)
                 environ_set(child, "PWD", 0, "/");                  environ_set(child, "PWD", 0, "/");

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31