diff options
Diffstat (limited to 'slave.c')
| -rw-r--r-- | slave.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -69,7 +69,7 @@ err: } pid_t -slave_spawn(int ptmx, int argc, char *const *argv, +slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv, const char *term_env, const char *conf_shell) { int fork_pipe[2]; @@ -90,6 +90,8 @@ slave_spawn(int ptmx, int argc, char *const *argv, /* Child */ close(fork_pipe[0]); /* Close read end */ + chdir(cwd); + /* Restore signals */ const struct sigaction sa = {.sa_handler = SIG_DFL}; if (sigaction(SIGINT, &sa, NULL) < 0 || |
