diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-25 00:01:25 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-25 00:01:25 +0000 |
commit | d4ed432960c1bf54de426bdb53825c1c1b32112e (patch) | |
tree | 56d60d455db64cb63694edcd4525298a506175d7 /src/posix | |
parent | 02fa8ea0993971a90b0f8d11b882af1e6a86c273 (diff) | |
download | execline-d4ed432960c1bf54de426bdb53825c1c1b32112e.tar.xz |
Port to skalibs-2.9.4.0
Diffstat (limited to 'src/posix')
-rw-r--r-- | src/posix/posix-cd.c | 8 | ||||
-rw-r--r-- | src/posix/posix-umask.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/posix/posix-cd.c b/src/posix/posix-cd.c index b4d2005..cbeea5b 100644 --- a/src/posix/posix-cd.c +++ b/src/posix/posix-cd.c @@ -91,7 +91,7 @@ int main (int argc, char const **argv, char const *const *envp) size_t sabase = sa.len ; if (sagetcwd(&sa) < 0) strerr_diefu1sys(111, "getcwd") ; if (!stralloc_0(&sa)) dienomem() ; - if (!pathexec_env("OLDPWD", sa.s + sabase)) dienomem() ; + if (!env_mexec("OLDPWD", sa.s + sabase)) dienomem() ; sa.len = sabase ; } @@ -114,7 +114,7 @@ int main (int argc, char const **argv, char const *const *envp) stralloc_free(&sa) ; sa = tmp ; } - if (!pathexec_env("PWD", sa.s)) dienomem() ; + if (!env_mexec("PWD", sa.s)) dienomem() ; #ifdef PATH_MAX if (sa.len > PATH_MAX && strlen(where) < PATH_MAX && x && *x) { @@ -144,7 +144,7 @@ int main (int argc, char const **argv, char const *const *envp) sa.len = 0 ; if (sagetcwd(&sa) < 0) strerr_diefu1sys(111, "getcwd") ; if (!stralloc_0(&sa)) dienomem() ; - if (!pathexec_env("PWD", sa.s)) dienomem() ; + if (!env_mexec("PWD", sa.s)) dienomem() ; } if (dopwd) @@ -154,5 +154,5 @@ int main (int argc, char const **argv, char const *const *envp) strerr_diefu1sys(111, "write to stdout") ; } - xpathexec0(argv) ; + xmexec0(argv) ; } diff --git a/src/posix/posix-umask.c b/src/posix/posix-umask.c index b4b9b4b..16d7f4f 100644 --- a/src/posix/posix-umask.c +++ b/src/posix/posix-umask.c @@ -10,7 +10,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/buffer.h> #include <skalibs/strerr2.h> -#include <skalibs/djbunix.h> +#include <skalibs/exec.h> #define USAGE "posix-umask [ -S ] [ mask ] [ prog... ]" #define dieusage() strerr_dieusage(100, USAGE) @@ -146,7 +146,7 @@ static inline unsigned int parsemode (char const *s) return ((unsigned int)modes[2] << 6) | ((unsigned int)modes[1] << 3) | modes[0] ; } -int main (int argc, char const **argv, char const *const *envp) +int main (int argc, char const **argv) { int sym = 0 ; unsigned int mode ; @@ -170,5 +170,5 @@ int main (int argc, char const **argv, char const *const *envp) if (!argc) return output(sym) ; if (!uint0_oscan(argv[0], &mode)) mode = ~parsemode(argv[0]) ; umask(mode & 00777) ; - xpathexec0_run(argv+1, envp) ; + xexec0(argv+1) ; } |