aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-21 14:29:42 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-21 14:29:42 +0000
commita484a65fefc89bce0f3b77503ad35bf86f329680 (patch)
tree30a06283899c86f50546d2775a6d674107a7772b
parentterm: term_spawn_new(): new function, spawns a new foot/footclient process (diff)
term: term_spawn_new: always spawn foot/footclient from PATH
-rw-r--r--main.c2
-rw-r--r--server.c2
-rw-r--r--terminal.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 540f106c..ee9900cb 100644
--- a/main.c
+++ b/main.c
@@ -224,7 +224,7 @@ main(int argc, char *const *argv)
goto out;
if (!as_server && (term = term_init(
- &conf, fdm, wayl, conf.term, prog_name, argc, argv,
+ &conf, fdm, wayl, conf.term, "foot", argc, argv,
&term_shutdown_cb, &shutdown_ctx)) == NULL)
goto out;
diff --git a/server.c b/server.c
index a8b15eba..d871f816 100644
--- a/server.c
+++ b/server.c
@@ -213,7 +213,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" /* TODO */, argc, argv, &term_shutdown_handler, client);
+ "footclient", argc, argv, &term_shutdown_handler, client);
if (client->term == NULL) {
LOG_ERR("failed to instantiate new terminal");
diff --git a/terminal.c b/terminal.c
index 4dfe5128..bd79bd08 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1672,7 +1672,7 @@ term_spawn_new(const struct terminal *term)
if (pid2 == 0) {
/* Child */
close(pipe_fds[0]);
- execl(term->foot_exe, term->foot_exe, NULL);
+ execlp(term->foot_exe, term->foot_exe, NULL);
write(pipe_fds[1], &errno, sizeof(errno));
_exit(errno);
}