aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-21 18:57:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-21 18:57:28 +0000
commit39146fac5cb7db4d0b68ba685722ca4713ddf722 (patch)
tree1b6bed7901d67048edfaf09e87ec87efaf301a85 /server.c
parentclient/server: client sends its CWD to server (diff)
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.
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index 6f1244fe..e3731bfb 100644
--- a/server.c
+++ b/server.c
@@ -220,7 +220,7 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
client->term = term_init(
server->conf, server->fdm, server->wayl,
strlen(term_env) > 0 ? term_env : server->conf->term,
- "footclient", argc, argv, &term_shutdown_handler, client);
+ "footclient", cwd, argc, argv, &term_shutdown_handler, client);
if (client->term == NULL) {
LOG_ERR("failed to instantiate new terminal");