aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-06-07 16:02:00 +0200
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-06-07 16:02:00 +0200
commit8f24f9812df8dec34a991b2c572092639586f154 (patch)
treefcfc01da5aa08243cd1f0ea3bc2f95a8d3206ada /runit
parentd6b05eb9c27196ebe89b180d71ad86bf42e97002 (diff)
downloadbusybox-8f24f9812df8dec34a991b2c572092639586f154.tar.gz
busybox-8f24f9812df8dec34a991b2c572092639586f154.tar.bz2
stop using non-standard macro, use WEXITSTATUS instead
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r--runit/runsv.c5
-rw-r--r--runit/sv.c2
-rw-r--r--runit/svlogd.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/runit/runsv.c b/runit/runsv.c
index 6d34dc133..5cb5d2f13 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -252,7 +252,8 @@ static unsigned custom(struct svdir *s, char c)
char a[10];
struct stat st;
- if (s->islog) return 0;
+ if (s->islog)
+ return 0;
strcpy(a, "control/?");
a[8] = c; /* replace '?' */
if (stat(a, &st) == 0) {
@@ -274,7 +275,7 @@ static unsigned custom(struct svdir *s, char c)
warn_cannot("wait for child control/?");
return 0;
}
- return !wait_exitcode(w);
+ return WEXITSTATUS(w) == 0;
}
} else {
if (errno != ENOENT)
diff --git a/runit/sv.c b/runit/sv.c
index 20e86199a..e3b9a4e31 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -337,7 +337,7 @@ static int checkscript(void)
bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service);
return 0;
}
- return !wait_exitcode(w);
+ return WEXITSTATUS(w) == 0;
}
static int check(const char *a)
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 9609fa37c..25799f6be 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -281,7 +281,7 @@ static unsigned processorstop(struct logdir *ld)
if (ld->fddir == -1) return 1;
while (fchdir(ld->fddir) == -1)
pause2cannot("change directory, want processor", ld->name);
- if (wait_exitcode(wstat) != 0) {
+ if (WEXITSTATUS(wstat) != 0) {
warnx("processor failed, restart", ld->name);
ld->fnsave[26] = 't';
unlink(ld->fnsave);