[PATCH v2 13/27] runsvdir: replace execlp call with BB_EXECVP
Nadav Tasher
tashernadav at gmail.com
Tue Jan 21 22:34:52 UTC 2025
Allows for more control over executed processes.
Signed-off-by: Nadav Tasher <tashernadav at gmail.com>
---
runit/runsvdir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index d6629dedd..f08880767 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -119,6 +119,7 @@ static void warnx(const char *m1)
static NOINLINE pid_t runsv(const char *name)
{
pid_t pid;
+ char* runsv_argv[] = { (char *) "runsv", (char *) name, NULL };
/* If we got signaled, stop spawning children at once! */
if (bb_got_signal)
@@ -143,7 +144,7 @@ static NOINLINE pid_t runsv(const char *name)
| (1 << SIGTERM)
, SIG_DFL);
#endif
- execlp("runsv", "runsv", name, (char *) NULL);
+ BB_EXECVP(runsv_argv[0], runsv_argv);
fatal2_cannot("start runsv ", name);
}
return pid;
--
2.43.0
More information about the busybox
mailing list