aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-12-05 03:31:05 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-12-05 03:31:05 +0100
commitbeb860ac758a5b08f4270da03a5f894f95816109 (patch)
treeebad6de37f503c941f479a86ed3d06b50ea174aa /init
parent0fa3e5f6f9ad55871d52bd10988fec66398f3d65 (diff)
downloadbusybox-w32-beb860ac758a5b08f4270da03a5f894f95816109.tar.gz
busybox-w32-beb860ac758a5b08f4270da03a5f894f95816109.tar.bz2
busybox-w32-beb860ac758a5b08f4270da03a5f894f95816109.zip
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index 645f694c0..864ee6ab8 100644
--- a/init/init.c
+++ b/init/init.c
@@ -523,15 +523,17 @@ static struct init_action *mark_terminated(pid_t pid)
523 struct init_action *a; 523 struct init_action *a;
524 524
525 if (pid > 0) { 525 if (pid > 0) {
526 update_utmp(pid, DEAD_PROCESS,
527 /*tty_name:*/ NULL,
528 /*username:*/ NULL,
529 /*hostname:*/ NULL
530 );
526 for (a = init_action_list; a; a = a->next) { 531 for (a = init_action_list; a; a = a->next) {
527 if (a->pid == pid) { 532 if (a->pid == pid) {
528 a->pid = 0; 533 a->pid = 0;
529 return a; 534 return a;
530 } 535 }
531 } 536 }
532 update_utmp(pid, DEAD_PROCESS, /*tty_name:*/ NULL,
533 /*username:*/ NULL,
534 /*hostname:*/ NULL);
535 } 537 }
536 return NULL; 538 return NULL;
537} 539}