From d02124902b4e27c3ed3ef48442ce17c5e0af9d56 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 11 Apr 2022 12:19:40 +0200 Subject: client: add -E,--client-environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When this option is used, the child process in the new terminal instance will inherit its environment from the footclient process, instead of the foot server’s. Implemented by sending (yet another) dynamic string list as part of the client -> server setup packet. When the new option is *not* used, the setup packet is now 2 bytes larger than before. On the server side, the slave process now uses execvpe() instead of execvp(). There’s plumbing to propagate a new ‘envp’ argument from term_init() all the way down to slave_exec(). If ‘envp’ is NULL, we use ‘environ’ instead (thus matching the old behavior of execvp()). Closes #1004 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4011dcde..6da82ef2 100644 --- a/main.c +++ b/main.c @@ -608,7 +608,7 @@ main(int argc, char *const *argv) if (!as_server && (term = term_init( &conf, fdm, reaper, wayl, "foot", cwd, token, - argc, argv, + argc, argv, NULL, &term_shutdown_cb, &shutdown_ctx)) == NULL) { goto out; } -- cgit v1.3