diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-04-28 22:10:30 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-04-28 22:10:30 +0000 |
commit | e5512f97985e8ce0798437750fa635dd1c3b02d9 (patch) | |
tree | fd8b47afaaf26258dae6b6012e8d1234a9ac1780 /src | |
parent | 03116e4e6ae398ef0835ce83d04cbff8a27aa3aa (diff) | |
download | s6-linux-init-e5512f97985e8ce0798437750fa635dd1c3b02d9.tar.xz |
More shutdownd fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/shutdown/s6-linux-init-shutdownd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c index 2cb9215..17b902e 100644 --- a/src/shutdown/s6-linux-init-shutdownd.c +++ b/src/shutdown/s6-linux-init-shutdownd.c @@ -74,8 +74,8 @@ static inline void run_stage3 (char const *basedir, char const *const *envp) static inline void prepare_shutdown (buffer *b, char c, unsigned int *what, tain_t *deadline, unsigned int *grace_time) { uint32_t u ; - char pack[TAIN_PACK] ; - ssize_t r = sanitize_read(buffer_get(b, pack, TAIN_PACK)) ; + char pack[TAIN_PACK + 4] ; + ssize_t r = sanitize_read(buffer_get(b, pack, TAIN_PACK + 4)) ; if (r == -1) strerr_diefu1sys(111, "read from pipe") ; if (r < TAIN_PACK + 4) strerr_dief1x(101, "bad shutdown protocol") ; *what = byte_chr("Shpr", c, 4) ; @@ -170,8 +170,8 @@ int main (int argc, char const *const *argv, char const *const *envp) /* if we're in stage 4, exec it immediately */ { - char const *stage4_argv[2] = { STAGE4_FILE, 0 } ; - pathexec_run(stage4_argv[0], stage4_argv, envp) ; + char const *stage4_argv[2] = { "./" STAGE4_FILE, 0 } ; + execve(stage4_argv[0], (char **)stage4_argv, (char *const *)envp) ; if (errno != ENOENT) strerr_warnwu2sys("exec ", stage4_argv[0]) ; } |