diff options
Diffstat (limited to 'src')
-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 |
9 files changed, 91 insertions, 2 deletions
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) ; +} |