From: Brett Gordon Date: Fri, 10 Nov 2017 05:57:32 +0000 (-0500) Subject: init: crunched table not reseting runlevel mask, correct cleanup. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=34b7176546e41dea27f3d861f9fc7f6bdb9be529;p=FUZIX.git init: crunched table not reseting runlevel mask, correct cleanup. --- 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 */