diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-02-19 10:01:19 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-02-19 10:01:19 +0000 |
commit | 742e67080586e212f3c6adbdc1c59bf56b0712b1 (patch) | |
tree | c5cb12542b0218f3fc94bf04b77f393fcad631a5 /spawn.c | |
parent | 11e404ca3c80893f59b1001f000c9390216c7e7a (diff) | |
parent | b04f8acb7057bda74e30976acedbbd73767e5bdc (diff) | |
download | rtmux-742e67080586e212f3c6adbdc1c59bf56b0712b1.tar.gz rtmux-742e67080586e212f3c6adbdc1c59bf56b0712b1.tar.bz2 rtmux-742e67080586e212f3c6adbdc1c59bf56b0712b1.zip |
Merge branch 'obsd-master' into master
Diffstat (limited to 'spawn.c')
-rw-r--r-- | spawn.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -377,10 +377,10 @@ spawn_pane(struct spawn_context *sc, char **cause) * Child process. Change to the working directory or home if that * fails. */ - if (chdir(new_wp->cwd) != 0) { - if ((tmp = find_home()) == NULL || chdir(tmp) != 0) - chdir("/"); - } + if (chdir(new_wp->cwd) != 0 && + ((tmp = find_home()) == NULL || chdir(tmp) != 0) && + chdir("/") != 0) + fatal("chdir failed"); /* * Update terminal escape characters from the session if available and |