summaryrefslogtreecommitdiff
path: root/src/daemontools-extras
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-08-28 13:59:16 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-08-28 13:59:16 +0000
commit04b699857c141a93fc981b83ba02b452ce3a2ddc (patch)
treef22701124126003ef8f3bca685c94b0de0cd9dec /src/daemontools-extras
parenta4deb6285e4a3d4aa10fe1913e0be400ec4be25e (diff)
downloads6-04b699857c141a93fc981b83ba02b452ce3a2ddc.tar.xz
Switch to xpathexec_*
Diffstat (limited to 'src/daemontools-extras')
-rw-r--r--src/daemontools-extras/s6-applyuidgid.c5
-rw-r--r--src/daemontools-extras/s6-envdir.c3
-rw-r--r--src/daemontools-extras/s6-envuidgid.c3
-rw-r--r--src/daemontools-extras/s6-log.c3
-rw-r--r--src/daemontools-extras/s6-setlock.c6
-rw-r--r--src/daemontools-extras/s6-setsid.c3
-rw-r--r--src/daemontools-extras/s6-setuidgid.c3
-rw-r--r--src/daemontools-extras/s6-softlimit.c3
8 files changed, 10 insertions, 19 deletions
diff --git a/src/daemontools-extras/s6-applyuidgid.c b/src/daemontools-extras/s6-applyuidgid.c
index a6e33d3..ba550c4 100644
--- a/src/daemontools-extras/s6-applyuidgid.c
+++ b/src/daemontools-extras/s6-applyuidgid.c
@@ -61,7 +61,6 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (uid && setuid(uid) < 0)
strerr_diefu1sys(111, "setuid") ;
- if (unexport) pathexec_r(argv, envp, env_len(envp), "UID\0GID\0GIDLIST", 16) ;
- else pathexec_run(argv[0], argv, envp) ;
- strerr_dieexec(111, argv[0]) ;
+ if (unexport) xpathexec_r(argv, envp, env_len(envp), "UID\0GID\0GIDLIST", 16) ;
+ else xpathexec_run(argv[0], argv, envp) ;
}
diff --git a/src/daemontools-extras/s6-envdir.c b/src/daemontools-extras/s6-envdir.c
index 431389b..140379d 100644
--- a/src/daemontools-extras/s6-envdir.c
+++ b/src/daemontools-extras/s6-envdir.c
@@ -35,6 +35,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (argc < 2) strerr_dieusage(100, USAGE) ;
if ((envdir_internal(*argv++, &modifs, options, nullis) < 0) && (insist || (errno != ENOENT)))
strerr_diefu1sys(111, "envdir") ;
- pathexec_r(argv, envp, env_len(envp), modifs.s, modifs.len) ;
- strerr_dieexec(111, argv[0]) ;
+ xpathexec_r(argv, envp, env_len(envp), modifs.s, modifs.len) ;
}
diff --git a/src/daemontools-extras/s6-envuidgid.c b/src/daemontools-extras/s6-envuidgid.c
index d808219..360c426 100644
--- a/src/daemontools-extras/s6-envuidgid.c
+++ b/src/daemontools-extras/s6-envuidgid.c
@@ -153,7 +153,6 @@ int main (int argc, char *const *argv, char const *const *envp)
pos += gid_fmtlist(fmt + pos, tab, n) ;
fmt[pos++] = 0 ;
}
- pathexec_r((char const *const *)argv + 1, envp, env_len(envp), fmt, pos) ;
+ xpathexec_r((char const *const *)argv + 1, envp, env_len(envp), fmt, pos) ;
}
- strerr_dieexec(111, argv[1]) ;
}
diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c
index 4a138fe..50c3b1b 100644
--- a/src/daemontools-extras/s6-log.c
+++ b/src/daemontools-extras/s6-log.c
@@ -323,8 +323,7 @@ static inline void exec_processor (logdir_t *ldp)
if (fd_move(5, fd) < 0) strerr_diefu3sys(111, "fd_move ", ldp->dir, "/newstate") ;
selfpipe_finish() ;
sig_restore(SIGPIPE) ;
- pathexec_run(cargv[0], cargv, (char const *const *)environ) ;
- strerr_dieexec(111, cargv[0]) ;
+ xpathexec_run(cargv[0], cargv, (char const *const *)environ) ;
}
static int rotator (logdir_t *ldp)
diff --git a/src/daemontools-extras/s6-setlock.c b/src/daemontools-extras/s6-setlock.c
index a90bb13..086c2f6 100644
--- a/src/daemontools-extras/s6-setlock.c
+++ b/src/daemontools-extras/s6-setlock.c
@@ -35,8 +35,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
case 'N' : nb = 0 ; break ;
case 'r' : ex = 0 ; break ;
case 'w' : ex = 1 ; break ;
- case 't' : if (!uint0_scan(subgetopt_here.arg, &timeout)) dieusage() ;
- nb = 2 ; break ;
+ case 't' : if (!uint0_scan(subgetopt_here.arg, &timeout)) dieusage() ; nb = 2 ; break ;
default : dieusage() ;
}
}
@@ -83,6 +82,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
fd_close(p[0]) ;
if (uncoe(p[1]) < 0) strerr_diefu1sys(111, "uncoe fd to helper") ;
}
- pathexec_run(argv[1], argv+1, envp) ;
- strerr_dieexec(111, argv[1]) ;
+ xpathexec_run(argv[1], argv+1, envp) ;
}
diff --git a/src/daemontools-extras/s6-setsid.c b/src/daemontools-extras/s6-setsid.c
index 0e30559..f77fb8a 100644
--- a/src/daemontools-extras/s6-setsid.c
+++ b/src/daemontools-extras/s6-setsid.c
@@ -66,6 +66,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
default : break ;
}
- pathexec_run(argv[0], argv, envp) ;
- strerr_dieexec(111, argv[0]) ;
+ xpathexec_run(argv[0], argv, envp) ;
}
diff --git a/src/daemontools-extras/s6-setuidgid.c b/src/daemontools-extras/s6-setuidgid.c
index 1893883..f8ba542 100644
--- a/src/daemontools-extras/s6-setuidgid.c
+++ b/src/daemontools-extras/s6-setuidgid.c
@@ -39,6 +39,5 @@ int main (int argc, char *const *argv, char const *const *envp)
newargv[m++] = "--" ;
while (*argv) newargv[m++] = *argv++ ;
newargv[m++] = 0 ;
- pathexec_run(newargv[0], newargv, envp) ;
- strerr_dieexec(111, newargv[0]) ;
+ xpathexec_run(newargv[0], newargv, envp) ;
}
diff --git a/src/daemontools-extras/s6-softlimit.c b/src/daemontools-extras/s6-softlimit.c
index d3fbaee..f12564d 100644
--- a/src/daemontools-extras/s6-softlimit.c
+++ b/src/daemontools-extras/s6-softlimit.c
@@ -111,6 +111,5 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
argc -= l.ind ; argv += l.ind ;
if (!argc) strerr_dieusage(100, USAGE) ;
- pathexec_run(argv[0], argv, envp) ;
- strerr_dieexec(111, argv[0]) ;
+ xpathexec_run(argv[0], argv, envp) ;
}