diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-01-16 16:56:49 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-01-16 16:56:49 +0000 |
commit | 67fe7156d9e5fb07d87742e148918329c362ae78 (patch) | |
tree | 0483dc5bcb7e64ab197291e2087f05e3fdb0e11f /src/supervision/s6-svscan.c | |
parent | e22ada794ba3ab78bd84036ca045ce748d8671e5 (diff) | |
download | s6-67fe7156d9e5fb07d87742e148918329c362ae78.tar.xz |
Use execv() where applicable
Diffstat (limited to 'src/supervision/s6-svscan.c')
-rw-r--r-- | src/supervision/s6-svscan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/supervision/s6-svscan.c b/src/supervision/s6-svscan.c index ebf7594..800fc9f 100644 --- a/src/supervision/s6-svscan.c +++ b/src/supervision/s6-svscan.c @@ -70,8 +70,8 @@ static void panicnosp (char const *errmsg) char const *eargv[2] = { CRASH_PROG, 0 } ; strerr_warnwu1sys(errmsg) ; strerr_warnw2x("executing into ", eargv[0]) ; - execve(eargv[0], (char *const *)eargv, (char *const *)environ) ; - /* and if that execve fails, screw it and just die */ + execv(eargv[0], (char *const *)eargv) ; + /* and if that exec fails, screw it and just die */ strerr_dieexec(111, eargv[0]) ; } @@ -580,7 +580,7 @@ int main (int argc, char const *const *argv) } { char const *eargv[3] = { FINISH_PROG, finish_arg, 0 } ; - execve(eargv[0], (char **)eargv, (char *const *)environ) ; + execv(eargv[0], (char **)eargv) ; } panicnosp("exec finish script " FINISH_PROG) ; } |