Allows for more control over executed processes.

Signed-off-by: Nadav Tasher <tasherna...@gmail.com>
---
 runit/svlogd.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/runit/svlogd.c b/runit/svlogd.c
index f7576f0fa..9b615a05d 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -393,6 +393,7 @@ static void processorstart(struct logdir *ld)
 {
        char sv_ch;
        int pid;
+       char* shell_argv[4];
 
        if (!ld->processor) return;
        if (ld->ppid) {
@@ -453,7 +454,11 @@ static void processorstart(struct logdir *ld)
                fd = xopen("newstate", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT);
                xmove_fd(fd, 5);
 
-               execl(G.shell, G.shell, "-c", ld->processor, (char*) NULL);
+               shell_argv[0] = (char *) G.shell;
+               shell_argv[1] = (char *) "-c";
+               shell_argv[2] = ld->processor;
+               shell_argv[3] = NULL;
+               BB_EXECVP(shell_argv[0], shell_argv);
                bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", 
ld->name);
        }
        ld->fnsave[26] = sv_ch; /* ...restore */
-- 
2.43.0

_______________________________________________
busybox mailing list
busybox@busybox.net
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to