diff options
author | nicm <nicm> | 2015-10-31 08:13:58 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-10-31 08:13:58 +0000 |
commit | 01defc9f4965bb174e1d1295754d5a8695683054 (patch) | |
tree | 6f8095583d6176dffe130d6ff3b5dbc3f0e3150d /cmd-if-shell.c | |
parent | 45f3cea263d1f99912cd6b353c91ccb872c26a71 (diff) | |
download | rtmux-01defc9f4965bb174e1d1295754d5a8695683054.tar.gz rtmux-01defc9f4965bb174e1d1295754d5a8695683054.tar.bz2 rtmux-01defc9f4965bb174e1d1295754d5a8695683054.zip |
Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r-- | cmd-if-shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 0271fdea..a9c84261 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -66,7 +66,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq) struct winlink *wl = NULL; struct window_pane *wp = NULL; struct format_tree *ft; - int cwd; + const char *cwd; if (args_has(args, 't')) { wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp); @@ -83,7 +83,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq) else if (s != NULL) cwd = s->cwd; else - cwd = -1; + cwd = NULL; } ft = format_create(); |