From 34b7176546e41dea27f3d861f9fc7f6bdb9be529 Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Fri, 10 Nov 2017 00:57:32 -0500 Subject: [PATCH] init: crunched table not reseting runlevel mask, correct cleanup. --- Applications/util/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Applications/util/init.c b/Applications/util/init.c index 22ea1179..b65be20e 100644 --- a/Applications/util/init.c +++ b/Applications/util/init.c @@ -285,6 +285,7 @@ static void parse_initline(void) bad_line(); return; } + *idata = 0; while (*sdata != ':') { if (*sdata == '\n' || sdata > sdata_end) { bad_line(); @@ -482,7 +483,7 @@ static int cleanup_runlevel(uint8_t oldmask, uint8_t newmask, int sig) while (n < initcount) { /* Dying ? */ - if ((p[3] & oldmask) && !(p[3] && newmask)) { + if ((p[3] & oldmask) && !(p[3] & newmask)) { /* Count number still to die */ if (p[4] == INIT_RESPAWN && initpid[n].pid) { /* Group kill */ -- 2.34.1