diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-28 13:59:16 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-28 13:59:16 +0000 |
commit | 04b699857c141a93fc981b83ba02b452ce3a2ddc (patch) | |
tree | f22701124126003ef8f3bca685c94b0de0cd9dec /src/conn-tools/s6-sudod.c | |
parent | a4deb6285e4a3d4aa10fe1913e0be400ec4be25e (diff) | |
download | s6-04b699857c141a93fc981b83ba02b452ce3a2ddc.tar.xz |
Switch to xpathexec_*
Diffstat (limited to 'src/conn-tools/s6-sudod.c')
-rw-r--r-- | src/conn-tools/s6-sudod.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/conn-tools/s6-sudod.c b/src/conn-tools/s6-sudod.c index a24e727..a7c5668 100644 --- a/src/conn-tools/s6-sudod.c +++ b/src/conn-tools/s6-sudod.c @@ -145,6 +145,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (pid < 0) strerr_diefu1sys(111, "fork") ; if (!pid) { + char c ; PROG = "s6-sudod (child)" ; fd_close(p[0]) ; if ((fd_move(2, m.fds[2]) < 0) @@ -157,11 +158,9 @@ int main (int argc, char const *const *argv, char const *const *envp) } selfpipe_finish() ; pathexec0_run(targv, tenvp) ; - { - char c = errno ; - fd_write(p[1], &c, 1) ; - } - strerr_dieexec(111, targv[0]) ; + c = errno ; + fd_write(p[1], &c, 1) ; + strerr_dieexec(c == ENOENT ? 127 : 126, targv[0]) ; } fd_close(p[1]) ; { |