From d953e8c58f98b4dcd47e8b657842e6fdca2678ff Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 19 Aug 2022 20:19:17 +0100 Subject: [PATCH] prefork-interp: fixes Signed-off-by: Ian Jackson --- cprogs/prefork-interp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cprogs/prefork-interp.c b/cprogs/prefork-interp.c index ec43bcf..56e848a 100644 --- a/cprogs/prefork-interp.c +++ b/cprogs/prefork-interp.c @@ -456,8 +456,8 @@ void become_setup(int sfd, int fake_pair[2], // different after the connect) by putting a name for it comma-separated // next to "v1". Simple extension can be done by having the script // side say something about it in the ack xdata, which we currently ignore. - putenv(m_asprintf("PREFORK_INTERP=v1 %d,%d %s", - sfd, call_fd, socket_path, watcher_stdin, watcher_stderr)); + putenv(m_asprintf("PREFORK_INTERP=v1 %d,%d,%d,%d", + sfd, call_fd, watcher_stdin, watcher_stderr)); execvp(executor_argv[0], (char**)executor_argv); diee("execute %s", executor_argv[0]); @@ -511,7 +511,7 @@ static void connect_or_spawn(void) { close(watcher_stdin[1]); close(watcher_stderr[0]); if (dup2(watcher_stdin[0], 0) != 0 || - dup2(watcher_stderr[1], 1) != 0) + dup2(watcher_stderr[1], 1) != 1) diee("initial dup2() for watcher"); close(watcher_stdin[0]); close(watcher_stderr[1]); -- 2.30.2