From 87fb72032e6aa6abe5ac8fb05d22f43e8dde557b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 6 Apr 2010 18:49:28 +0200 Subject: [PATCH] init: clear utmp entries for dead processes, if they (entries) exist Signed-off-by: Denys Vlasenko --- init/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init/init.c b/init/init.c index b9c892407..481f55167 100644 --- a/init/init.c +++ b/init/init.c @@ -15,6 +15,9 @@ #include #include #include +#if ENABLE_FEATURE_UTMP +# include /* DEAD_PROCESS */ +#endif /* Was a CONFIG_xxx option. A lot of people were building @@ -415,6 +418,7 @@ static struct init_action *mark_terminated(pid_t pid) return a; } } + update_utmp(pid, DEAD_PROCESS, /*tty_name:*/ NULL, /*username:*/ NULL, /*hostname:*/ NULL); } return NULL; } -- 2.25.1