From 39146fac5cb7db4d0b68ba685722ca4713ddf722 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 21 Dec 2019 19:57:28 +0100 Subject: term: term_init: add 'cwd' argument This is used when spawning the slave, to set its current working directory just before we exec() the client. In a regular foot instance, we set the cwd from getcwd(). In a foot server instance, each connecting client sends its cwd to the server, and we use that. --- slave.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'slave.h') diff --git a/slave.h b/slave.h index f1a9848a..63fe9bff 100644 --- a/slave.h +++ b/slave.h @@ -4,4 +4,5 @@ #include pid_t slave_spawn( - int ptmx, int argc, char *const *argv, const char *term_env, const char *conf_shell); + int ptmx, int argc, const char *cwd, char *const *argv, const char *term_env, + const char *conf_shell); -- cgit v1.3