From 6062586370a5a083386a8ed8e3533671c89abd73 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 22 Aug 2017 15:48:16 +0000 Subject: Convert to xpathexec ; prepare for 2.2.1.1 --- COPYING | 2 +- INSTALL | 2 +- NEWS | 6 ++++++ doc/index.html | 8 +++++--- doc/upgrade.html | 6 ++++++ package/info | 2 +- src/skaembutils/s6-env.c | 4 +--- src/skaembutils/s6-nice.c | 3 +-- src/skaembutils/s6-sleep.c | 3 +-- src/skaembutils/s6-tail.c | 2 -- src/skaembutils/seekablepipe.c | 3 +-- 11 files changed, 24 insertions(+), 17 deletions(-) diff --git a/COPYING b/COPYING index f496e31..cc344f1 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2011-2016 Laurent Bercot +Copyright (c) 2011-2017 Laurent Bercot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/INSTALL b/INSTALL index 7fd3f60..d377baf 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.5.1.0 or later: http://skarnet.org/software/skalibs/ + - skalibs version 2.6.0.0 or later: http://skarnet.org/software/skalibs/ This software will run on any operating system that implements POSIX.1-2008, available at: diff --git a/NEWS b/NEWS index d35a0d9..23713ae 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Changelog for s6-portable-utils. +In 2.2.1.1 +---------- + + - Bugfix release. + + In 2.2.1.0 ---------- diff --git a/doc/index.html b/doc/index.html index 9bdfbae..76d4bcc 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,7 +61,7 @@ the package is now used to host specific utilities such as
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.5.1.0 or later. It's a build-time requirement. It's also a run-time +2.6.0.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library.
  • @@ -77,7 +77,7 @@ library.
    • The current released version of s6-portable-utils is -2.2.1.0.
    • +2.2.1.1.
    • Alternatively, you can checkout a copy of the s6-portable-utils git repository: @@ -108,7 +108,9 @@ the previous versions of s6-portable-utils and the current one.
    • All these commands exit 111 if they encounter a temporary error, and -100 if they encounter a permanent error - such as a misuse. +100 if they encounter a permanent error - such as a misuse. They exit +127 if they're trying to execute into a program and cannot find it, and +126 if they fail to execute into a program for another reason.

        diff --git a/doc/upgrade.html b/doc/upgrade.html index d6ddc6b..a0e48d4 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,12 @@

        What has changed in s6-portable-utils

        +

        in 2.2.1.1

        + +
          +
        • skalibs dependency bumped to 2.6.0.0.
        • +
        +

        in 2.2.1.0

          diff --git a/package/info b/package/info index a2b47ab..98669e7 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-portable-utils -version=2.2.1.0 +version=2.2.1.1 category=admin package_macro_name=S6_PORTABLE_UTILS 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) ; } -- cgit v1.3.1