summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pipe-tools/s6-ftrig-listen.c13
-rw-r--r--src/pipe-tools/s6-ftrig-listen1.c13
2 files changed, 4 insertions, 22 deletions
diff --git a/src/pipe-tools/s6-ftrig-listen.c b/src/pipe-tools/s6-ftrig-listen.c
index 2f6e82b..3683dff 100644
--- a/src/pipe-tools/s6-ftrig-listen.c
+++ b/src/pipe-tools/s6-ftrig-listen.c
@@ -78,17 +78,8 @@ int main (int argc, char const **argv, char const *const *envp)
if (!ids[i]) strerr_diefu4sys(111, "subscribe to ", argv[i<<1], " with regexp ", argv[(i<<1)+1]) ;
}
- pid = fork() ;
- switch (pid)
- {
- case -1 : strerr_diefu1sys(111, "fork") ;
- case 0 :
- {
- PROG = "s6-ftrig-listen (child)" ;
- pathexec_run(argv[argc1 + 1], argv + argc1 + 1, envp) ;
- strerr_dieexec(111, argv[argc1 + 1]) ;
- }
- }
+ pid = child_spawn0(argv[argc1 + 1], argv + argc1 + 1, envp) ;
+ if (!pid) strerr_diefu2sys(111, "spawn ", argv[argc1 + 1]) ;
for (;;)
{
diff --git a/src/pipe-tools/s6-ftrig-listen1.c b/src/pipe-tools/s6-ftrig-listen1.c
index 1354a64..ffb43cc 100644
--- a/src/pipe-tools/s6-ftrig-listen1.c
+++ b/src/pipe-tools/s6-ftrig-listen1.c
@@ -65,17 +65,8 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "sig_ignore") ;
x[1].fd = ftrigr_fd(&a) ;
- pid = fork() ;
- switch (pid)
- {
- case -1 : strerr_diefu1sys(111, "fork") ;
- case 0 :
- {
- PROG = "s6-ftrig-listen1 (child)" ;
- pathexec_run(argv[2], argv+2, envp) ;
- strerr_dieexec(111, argv[2]) ;
- }
- }
+ pid = child_spawn0(argv[2], argv+2, envp) ;
+ if (!pid) strerr_diefu2sys(111, "spawn ", argv[2]) ;
for (;;)
{