init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -523,15 +523,17 @@ static struct init_action *mark_terminated(pid_t pid)
|
|||||||
struct init_action *a;
|
struct init_action *a;
|
||||||
|
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
|
update_utmp(pid, DEAD_PROCESS,
|
||||||
|
/*tty_name:*/ NULL,
|
||||||
|
/*username:*/ NULL,
|
||||||
|
/*hostname:*/ NULL
|
||||||
|
);
|
||||||
for (a = init_action_list; a; a = a->next) {
|
for (a = init_action_list; a; a = a->next) {
|
||||||
if (a->pid == pid) {
|
if (a->pid == pid) {
|
||||||
a->pid = 0;
|
a->pid = 0;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update_utmp(pid, DEAD_PROCESS, /*tty_name:*/ NULL,
|
|
||||||
/*username:*/ NULL,
|
|
||||||
/*hostname:*/ NULL);
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user