diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-18 13:33:40 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-18 13:33:40 +0000 |
commit | 3d210ed280513100f9466a2c171db77ee6952a25 (patch) | |
tree | a5a40ee9ab6b314db6aa66843ceb85a2a06cc9bb | |
parent | 5246da15e870b83bb0c803bde31317b01731b23f (diff) | |
download | skalibs-3d210ed280513100f9466a2c171db77ee6952a25.tar.xz |
Add xpathexec_* functions, prepare for 2.5.1.0
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/libstddjb/djbunix.html | 17 | ||||
-rw-r--r-- | doc/license.html | 2 | ||||
-rw-r--r-- | doc/upgrade.html | 5 | ||||
-rw-r--r-- | package/deps.mak | 8 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/include/skalibs/djbunix.h | 13 | ||||
-rw-r--r-- | src/libstddjb/xexecvep.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec0.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec0_run.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec_fromenv.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec_r.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec_r_name.c | 10 | ||||
-rw-r--r-- | src/libstddjb/xpathexec_run.c | 10 |
17 files changed, 127 insertions, 9 deletions
@@ -6,6 +6,7 @@ Contributors: William E. Baxter <web@superscript.com> Olivier Brunel <jjk@jjacky.com> Lionel Van Bemten <lionel.van_bemten@nokia.com> + Rasmus Villemoes <rv@rasmusvillemoes.dk> Thanks to: Jean Marot <jean.marot@skarnet.org> @@ -1,9 +1,11 @@ Changelog for skalibs. -In 2.5.0.1 +In 2.5.1.0 ---------- - - Bugfix release. + - Bugfixes. + - More workarounds for sysdeps detection by broken toolchains. + - Added the xpathexec_* family of functions (in djbunix.h). In 2.5.0.0 diff --git a/doc/index.html b/doc/index.html index d1c299f..6ff4d54 100644 --- a/doc/index.html +++ b/doc/index.html @@ -60,7 +60,7 @@ with a standard C development environment </li> <h3> Download </h3> <ul> - <li> The current released version of skalibs is <a href="skalibs-2.5.0.1.tar.gz">2.5.0.1</a>. </li> + <li> The current released version of skalibs is <a href="skalibs-2.5.1.0.tar.gz">2.5.1.0</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="http://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/">skalibs git repository</a>: diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html index 5e9cae1..fe0d1eb 100644 --- a/doc/libstddjb/djbunix.html +++ b/doc/libstddjb/djbunix.html @@ -412,6 +412,23 @@ modified by the hidden modifier string. If this command line is empty, exit 0 instead. </p> +<p> <code> +void xexecvep (char const *, char const *const *, char const *const *, char const *) <br /> +void xpathexec_r (char const *const *, char const *const *, size_t, char const *, size_t) <br /> +void xpathexec_r_name (char const *, char const *const *, char const *const *, size_t, char const *, size_t) <br /> +void xpathexec_fromenv (char const *const *, char const *const *, size_t) <br /> +void xpathexec_run (char const *, char const *const *, char const *const *) <br /> +void xpathexec0_run (char const *const *, char const *const *) <br /> +void xpathexec (char const *const *) <br /> +void xpathexec0 (char const *const *) +</code> </p> + +<p> + Those functions provide the same functionality as the non-x-prefixed versions, +but if the execution fails (i.e. the process cannot exec into a new program), then +the process dies with a 111 exit code and an error message on stderr. +</p> + <p> The <a href="env.html">env</a> library interface provides additional functions to manipulate modifier strings and environments. diff --git a/doc/license.html b/doc/license.html index 7a2874a..e8f7178 100644 --- a/doc/license.html +++ b/doc/license.html @@ -74,7 +74,7 @@ color, or different text font. </li> <p> <em>I am aware that the previous restrictions sound completely ridiculous while the official skalibs documentation is incomplete. -As of 2.5.0.1, I'm not going to enforce those restrictions, but if you're +As of 2.5.1.0, I'm not going to enforce those restrictions, but if you're going to provide documentation for skalibs, don't keep it to yourself, please send it to me instead. :-) </em> </p> diff --git a/doc/upgrade.html b/doc/upgrade.html index abaf22b..f1c8964 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -17,10 +17,11 @@ </p> -<h2> in 2.5.0.1 </h2> +<h2> in 2.5.1.0 </h2> <ul> - <li> No functional changes. </li> + <li> The <tt>xpathexec_*</tt> family of functions has been added to +<a href="libstddjb/djbunix.html">skalibs/djbunix.h</a>. </li> </ul> <h1> What has changed in skalibs </h1> diff --git a/package/deps.mak b/package/deps.mak index a33f169..49b0648 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -669,6 +669,14 @@ src/libstddjb/wait_reap.o src/libstddjb/wait_reap.lo: src/libstddjb/wait_reap.c src/libstddjb/waitn.o src/libstddjb/waitn.lo: src/libstddjb/waitn.c src/include/skalibs/djbunix.h src/libstddjb/waitn_reap.o src/libstddjb/waitn_reap.lo: src/libstddjb/waitn_reap.c src/include/skalibs/djbunix.h src/libstddjb/waitpid_nointr.o src/libstddjb/waitpid_nointr.lo: src/libstddjb/waitpid_nointr.c src/include/skalibs/djbunix.h +src/libstddjb/xexecvep.o src/libstddjb/xexecvep.lo: src/libstddjb/xexecvep.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec.o src/libstddjb/xpathexec.lo: src/libstddjb/xpathexec.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec0.o src/libstddjb/xpathexec0.lo: src/libstddjb/xpathexec0.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec0_run.o src/libstddjb/xpathexec0_run.lo: src/libstddjb/xpathexec0_run.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec_fromenv.o src/libstddjb/xpathexec_fromenv.lo: src/libstddjb/xpathexec_fromenv.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec_r.o src/libstddjb/xpathexec_r.lo: src/libstddjb/xpathexec_r.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec_r_name.o src/libstddjb/xpathexec_r_name.lo: src/libstddjb/xpathexec_r_name.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h +src/libstddjb/xpathexec_run.o src/libstddjb/xpathexec_run.lo: src/libstddjb/xpathexec_run.c src/include/skalibs/djbunix.h src/include/skalibs/strerr2.h src/libunixonacid/atomic_rm_rf.o src/libunixonacid/atomic_rm_rf.lo: src/libunixonacid/atomic_rm_rf.c src/include/skalibs/skamisc.h src/include/skalibs/unix-transactional.h src/libunixonacid/atomic_rm_rf_tmp.o src/libunixonacid/atomic_rm_rf_tmp.lo: src/libunixonacid/atomic_rm_rf_tmp.c src/include/skalibs/djbunix.h src/include/skalibs/random.h src/include/skalibs/stralloc.h src/include/skalibs/unix-transactional.h src/libunixonacid/bufalloc_timed_flush.o src/libunixonacid/bufalloc_timed_flush.lo: src/libunixonacid/bufalloc_timed_flush.c src/include/skalibs/bufalloc.h src/include/skalibs/functypes.h src/include/skalibs/unix-timed.h diff --git a/package/info b/package/info index f993d8e..79d42f0 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=skalibs -version=2.5.0.1 +version=2.5.1.0 category=prog package_macro_name=SKALIBS diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h index fb08658..d7a1bd2 100644 --- a/src/include/skalibs/djbunix.h +++ b/src/include/skalibs/djbunix.h @@ -61,6 +61,15 @@ extern void pathexec0_run (char const *const *, char const *const *) ; extern void pathexec (char const *const *) ; extern void pathexec0 (char const *const *) ; +extern void xpathexec_r (char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ; +extern void xpathexec_r_name (char const *, char const *const *, char const *const *, size_t, char const *, size_t) gccattr_noreturn ; +extern void xpathexec_fromenv (char const *const *, char const *const *, size_t) gccattr_noreturn ; +extern void xexecvep (char const *, char const *const *, char const *const *, char const *) gccattr_noreturn ; +extern void xpathexec_run (char const *, char const *const *, char const *const *) gccattr_noreturn ; +extern void xpathexec0_run (char const *const *, char const *const *) gccattr_noreturn ; +extern void xpathexec (char const *const *) gccattr_noreturn ; +extern void xpathexec0 (char const *const *) gccattr_noreturn ; + #define prot_gid(gid) setgid(gid) #define prot_uid(uid) setuid(uid) extern int prot_readgroups (char const *, gid_t *, unsigned int) ; @@ -152,11 +161,11 @@ extern pid_t child_spawn2 (char const *, char const *const *, char const *const /* - Unified function to fork a child with communication canals. + Unified function to fork a child with communication channels (pipes). * uses posix_spawn() if available, else uses fork+exec * requests n (the last arg) communication fds between parent and child * if n=1, equivalent to child_spawn1_pipe; child writes, parent reads. - * if n>=2, the fds are pipes, parent reads on even and writes on odd. + * if n>=2, parent reads on even and writes on odd. */ extern pid_t child_spawn (char const *, char const *const *, char const *const *, int *, unsigned int) ; diff --git a/src/libstddjb/xexecvep.c b/src/libstddjb/xexecvep.c new file mode 100644 index 0000000..3a3363e --- /dev/null +++ b/src/libstddjb/xexecvep.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xexecvep (char const *file, char const *const *argv, char const *const *envp, char const *path) +{ + execvep(file, argv, envp, path) ; + strerr_dieexec(111, file) ; +} diff --git a/src/libstddjb/xpathexec.c b/src/libstddjb/xpathexec.c new file mode 100644 index 0000000..92e78dd --- /dev/null +++ b/src/libstddjb/xpathexec.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec (char const *const *argv) +{ + pathexec(argv) ; + strerr_dieexec(111, argv[0]) ; +} diff --git a/src/libstddjb/xpathexec0.c b/src/libstddjb/xpathexec0.c new file mode 100644 index 0000000..c9c2c74 --- /dev/null +++ b/src/libstddjb/xpathexec0.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec0 (char const *const *argv) +{ + pathexec0(argv) ; + strerr_dieexec(111, argv[0]) ; +} diff --git a/src/libstddjb/xpathexec0_run.c b/src/libstddjb/xpathexec0_run.c new file mode 100644 index 0000000..c24e931 --- /dev/null +++ b/src/libstddjb/xpathexec0_run.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec0_run (char const *const *argv, char const *const *envp) +{ + pathexec0_run(argv, envp) ; + strerr_dieexec(111, argv[0]) ; +} diff --git a/src/libstddjb/xpathexec_fromenv.c b/src/libstddjb/xpathexec_fromenv.c new file mode 100644 index 0000000..e75b94a --- /dev/null +++ b/src/libstddjb/xpathexec_fromenv.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec_fromenv (char const *const *argv, char const *const *envp, size_t envlen) +{ + pathexec_fromenv(argv, envp, envlen) ; + strerr_dieexec(111, argv[0]) ; +} diff --git a/src/libstddjb/xpathexec_r.c b/src/libstddjb/xpathexec_r.c new file mode 100644 index 0000000..02628f3 --- /dev/null +++ b/src/libstddjb/xpathexec_r.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec_r (char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen) +{ + pathexec_r(argv, envp, envlen, modifs, modiflen) ; + strerr_dieexec(111, argv[0]) ; +} diff --git a/src/libstddjb/xpathexec_r_name.c b/src/libstddjb/xpathexec_r_name.c new file mode 100644 index 0000000..76eaf2e --- /dev/null +++ b/src/libstddjb/xpathexec_r_name.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec_r_name (char const *file, char const *const *argv, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen) +{ + pathexec_r_name(file, argv, envp, envlen, modifs, modiflen) ; + strerr_dieexec(111, file) ; +} diff --git a/src/libstddjb/xpathexec_run.c b/src/libstddjb/xpathexec_run.c new file mode 100644 index 0000000..3596f2f --- /dev/null +++ b/src/libstddjb/xpathexec_run.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> +#include <skalibs/strerr2.h> + +void xpathexec_run (char const *file, char const *const *argv, char const *const *envp) +{ + pathexec_run(file, argv, envp) ; + strerr_dieexec(111, file) ; +} |