summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-05-02 01:15:46 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-05-02 01:15:46 +0000
commitea5938a148b4ee2981a656bd10a7a8d0f1596b77 (patch)
treedd3ffc64aa09ac57d9029c643a339f2dbf173ffc
parent551f39fe587758897bf8a283fcb722b34b7211aa (diff)
downloads6-linux-init-ea5938a148b4ee2981a656bd10a7a8d0f1596b77.tar.xz
Some printf debugging...
-rw-r--r--src/shutdown/s6-linux-init-shutdownd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c
index 130be1a..274581b 100644
--- a/src/shutdown/s6-linux-init-shutdownd.c
+++ b/src/shutdown/s6-linux-init-shutdownd.c
@@ -123,6 +123,11 @@ static inline void prepare_stage4 (char const *basedir, unsigned int what)
int fd ;
char buf[512] ;
char c = "hpr"[what - 1] ;
+
+ char s[2] = { c, 0 } ;
+ buf[uint_fmt(buf, what)] = 0 ;
+ strerr_warn4x("preparing stage 4: what = ", buf, " ; c = ", s) ;
+
unlink_void(STAGE4_FILE ".new") ;
fd = open_excl(STAGE4_FILE ".new") ;
if (fd == -1) strerr_diefu3sys(111, "open ", STAGE4_FILE ".new", " for writing") ;
@@ -141,6 +146,7 @@ static inline void prepare_stage4 (char const *basedir, unsigned int what)
fd_close(fd) ;
if (rename(STAGE4_FILE ".new", STAGE4_FILE) == -1)
strerr_diefu4sys(111, "rename ", STAGE4_FILE ".new", " to ", STAGE4_FILE) ;
+ sleep(20) ;
}
static inline void unsupervise_tree (void)