summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-09 10:56:44 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-09 10:56:44 +0000
commit6d0a65561f740c23f0d164416218e5ab95c629b1 (patch)
treec5930b9b25bb09d691ea737765849d91de51eeaa
parent82c05711204ee4a997499386167a5e6b0b1d8fa2 (diff)
downloads6-linux-init-6d0a65561f740c23f0d164416218e5ab95c629b1.tar.xz
Adapt to skalibs-2.14
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/init/s6-linux-init-telinit.c3
-rw-r--r--src/shutdown/s6-linux-init-shutdownd.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/init/s6-linux-init-telinit.c b/src/init/s6-linux-init-telinit.c
index 1ad3f44..173451c 100644
--- a/src/init/s6-linux-init-telinit.c
+++ b/src/init/s6-linux-init-telinit.c
@@ -6,6 +6,7 @@
#include <skalibs/types.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr.h>
+#include <skalibs/cspawn.h>
#include <skalibs/djbunix.h>
#include <skalibs/exec.h>
@@ -66,7 +67,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (!strcmp(argv[0], "0") || !strcmp(argv[0], "6"))
{
int wstat ;
- pid_t pid = child_spawn0(newargv[0], newargv, envp) ;
+ pid_t pid = cspawn(newargv[0], newargv, envp, 0, 0, 0) ;
if (!pid) strerr_diefu2sys(111, "spawn ", newargv[0]) ;
if (wait_pid(pid, &wstat) < 0) strerr_diefu1sys(111, "wait_pid") ;
if (WIFSIGNALED(wstat))
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c
index b53042e..5a17625 100644
--- a/src/shutdown/s6-linux-init-shutdownd.c
+++ b/src/shutdown/s6-linux-init-shutdownd.c
@@ -21,6 +21,7 @@
#include <skalibs/sig.h>
#include <skalibs/tai.h>
#include <skalibs/direntry.h>
+#include <skalibs/cspawn.h>
#include <skalibs/djbunix.h>
#include <skalibs/iopause.h>
#include <skalibs/skamisc.h>
@@ -78,7 +79,7 @@ static inline void run_stage3 (char const *basedir)
char const *stage3_argv[2] = { stage3, 0 } ;
memcpy(stage3, basedir, basedirlen) ;
memcpy(stage3 + basedirlen, "/scripts/" STAGE3, sizeof("/scripts/" STAGE3)) ;
- pid = child_spawn0(stage3_argv[0], stage3_argv, (char const *const *)environ) ;
+ pid = cspawn(stage3_argv[0], stage3_argv, (char const *const *)environ, CSPAWN_FLAGS_SIGBLOCKNONE, 0, 0) ;
if (pid)
{
int wstat ;