diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-22 15:48:16 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-22 15:48:16 +0000 |
commit | 6062586370a5a083386a8ed8e3533671c89abd73 (patch) | |
tree | 621fdc90c7842aff9b2f6935fcca3b875f891a79 /src/skaembutils | |
parent | 9f808a8c646f27ff3ca5b80d24534c0587fab559 (diff) | |
download | s6-portable-utils-6062586370a5a083386a8ed8e3533671c89abd73.tar.xz |
Convert to xpathexec ; prepare for 2.2.1.1
Diffstat (limited to 'src/skaembutils')
-rw-r--r-- | src/skaembutils/s6-env.c | 4 | ||||
-rw-r--r-- | src/skaembutils/s6-nice.c | 3 | ||||
-rw-r--r-- | src/skaembutils/s6-sleep.c | 3 | ||||
-rw-r--r-- | src/skaembutils/s6-tail.c | 2 | ||||
-rw-r--r-- | src/skaembutils/seekablepipe.c | 3 |
5 files changed, 4 insertions, 11 deletions
diff --git a/src/skaembutils/s6-env.c b/src/skaembutils/s6-env.c index 8db6288..ce91b94 100644 --- a/src/skaembutils/s6-env.c +++ b/src/skaembutils/s6-env.c @@ -37,7 +37,5 @@ int main (int argc, char const *const *argv, char const *const *envp) strerr_diefu1sys(111, "stralloc_cats") ; } if (!argc) argv = arg_zero ; - pathexec_r(argv, envp, env_len(envp), modifs.s, modifs.len) ; - stralloc_free(&modifs) ; - strerr_dieexec((errno == ENOENT) ? 127 : 126, argv[0]) ; + xpathexec_r(argv, envp, env_len(envp), modifs.s, modifs.len) ; } diff --git a/src/skaembutils/s6-nice.c b/src/skaembutils/s6-nice.c index 29b7ff6..3347d54 100644 --- a/src/skaembutils/s6-nice.c +++ b/src/skaembutils/s6-nice.c @@ -40,6 +40,5 @@ int main (int argc, char const *const *argv, char const *const *envp) if (strict) strerr_diefu2sys(111, "nice to ", fmt) ; else strerr_warnwu2sys("nice to ", fmt) ; } - pathexec_run(argv[0], argv, envp) ; - strerr_dieexec((errno == ENOENT) ? 127 : 126, argv[0]) ; + xpathexec_run(argv[0], argv, envp) ; } diff --git a/src/skaembutils/s6-sleep.c b/src/skaembutils/s6-sleep.c index 5519d0d..cde1282 100644 --- a/src/skaembutils/s6-sleep.c +++ b/src/skaembutils/s6-sleep.c @@ -40,6 +40,5 @@ int main (int argc, char const *const *argv, char const *const *envp) deepsleepuntil_g(&deadline) ; } - pathexec0_run(argv+1, envp) ; - strerr_dieexec(111, argv[1]) ; + xpathexec0_run(argv+1, envp) ; } diff --git a/src/skaembutils/s6-tail.c b/src/skaembutils/s6-tail.c index 479f950..7023505 100644 --- a/src/skaembutils/s6-tail.c +++ b/src/skaembutils/s6-tail.c @@ -56,9 +56,7 @@ static int pluschars (int fd, size_t n) if (nil < 0) return 0 ; if (!fd_catn(fd, nil, n)) { - int e = errno ; fd_close(nil) ; - errno = e ; return 0 ; } fd_close(nil) ; diff --git a/src/skaembutils/seekablepipe.c b/src/skaembutils/seekablepipe.c index 611f227..419be78 100644 --- a/src/skaembutils/seekablepipe.c +++ b/src/skaembutils/seekablepipe.c @@ -36,6 +36,5 @@ int main (int argc, char const *const *argv, char const *const *envp) fd_close(fdw) ; if (fd_move(0, fdr) < 0) strerr_diefu1sys(111, "move fdr to stdin") ; - pathexec_run(argv[2], argv+2, envp) ; - strerr_dieexec(111, argv[2]) ; + xpathexec_run(argv[2], argv+2, envp) ; } |