mirror of
https://github.com/sheumann/hush.git
synced 2024-08-21 11:28:57 +00:00
init: clear utmp entries for dead processes, if they (entries) exist
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6dbbac5d4f
commit
87fb72032e
@ -15,6 +15,9 @@
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/resource.h>
|
||||
#include <linux/vt.h>
|
||||
#if ENABLE_FEATURE_UTMP
|
||||
# include <utmp.h> /* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user