[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] init: Remember unterminated processes during inittab reload
From:       Paulius Zaleckas <paulius.zaleckas () gmail ! com>
Date:       2013-07-25 15:38:09
Message-ID: 20130725153809.5915.92255.stgit () localhost ! localdomain
[Download RAW message or body]

This feature was removed in 72c99af

It is useful when process is removed from inittab and later added
back, but never terminated. It prevents init from spawning duplicate.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---
 init/init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/init.c b/init/init.c
index f3a35d5..5146eae 100644
--- a/init/init.c
+++ b/init/init.c
@@ -933,7 +933,7 @@ static void reload_inittab(void)
 	 * removing them too saves a few bytes */
 	nextp = &init_action_list;
 	while ((a = *nextp) != NULL) {
-		if ((a->action_type & ~SYSINIT) == 0) {
+		if ((a->action_type & ~SYSINIT) == 0 && a->pid == 0) {
 			*nextp = a->next;
 			free(a);
 		} else {

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic