diff options
author | Denys Vlasenko | 2011-12-05 03:31:05 +0100 |
---|---|---|
committer | Denys Vlasenko | 2011-12-05 03:31:05 +0100 |
commit | beb860ac758a5b08f4270da03a5f894f95816109 (patch) | |
tree | ebad6de37f503c941f479a86ed3d06b50ea174aa /init | |
parent | 0fa3e5f6f9ad55871d52bd10988fec66398f3d65 (diff) | |
download | busybox-beb860ac758a5b08f4270da03a5f894f95816109.zip busybox-beb860ac758a5b08f4270da03a5f894f95816109.tar.gz |
init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |