From: Denys Vlasenko Date: Mon, 5 Dec 2011 02:31:05 +0000 (+0100) Subject: init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing. X-Git-Tag: 1_20_0~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=beb860ac758a5b08f4270da03a5f894f95816109;p=platform%2Fupstream%2Fbusybox.git init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing. Signed-off-by: Denys Vlasenko --- diff --git a/init/init.c b/init/init.c index 645f694..864ee6a 100644 --- a/init/init.c +++ b/init/init.c @@ -523,15 +523,17 @@ static struct init_action *mark_terminated(pid_t pid) struct init_action *a; if (pid > 0) { + update_utmp(pid, DEAD_PROCESS, + /*tty_name:*/ NULL, + /*username:*/ NULL, + /*hostname:*/ NULL + ); for (a = init_action_list; a; a = a->next) { if (a->pid == pid) { a->pid = 0; return a; } } - update_utmp(pid, DEAD_PROCESS, /*tty_name:*/ NULL, - /*username:*/ NULL, - /*hostname:*/ NULL); } return NULL; }