From 67fe7156d9e5fb07d87742e148918329c362ae78 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 16 Jan 2020 16:56:49 +0000 Subject: Use execv() where applicable --- src/supervision/s6-supervise.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/supervision/s6-supervise.c') diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index 5c431db..da6a187 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -279,7 +278,7 @@ static void trystart (void) failcoe(p[1]) ; strerr_diefu1sys(127, "access ./nosetsid") ; } - execve("./run", (char *const *)cargv, (char *const *)environ) ; + execv("./run", (char *const *)cargv) ; failcoe(p[1]) ; strerr_dieexec(127, "run") ; } @@ -397,7 +396,7 @@ static int uplastup_z (void) fmt0[uint_fmt(fmt0, WIFSIGNALED(status.wstat) ? 256 : WEXITSTATUS(status.wstat))] = 0 ; fmt1[uint_fmt(fmt1, WTERMSIG(status.wstat))] = 0 ; maybesetsid() ; - execve("./finish", cargv, (char *const *)environ) ; + execv("./finish", cargv) ; _exit(127) ; } status.flagfinishing = 1 ; -- cgit v1.2.3