mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
UTMP: Only account for getty processes
This patch removes accounting for all processes to instead implement the traditional SysV getty accounting. (Telnet/SSH et al maintain their own accounding for UTMP.) TODO: WTMP support Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b6bf8bf518
commit
5bab329178
3 files changed
+4
-11
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#include "conf.h"
|
||||
#include "helpers.h"
|
||||
#include "tty.h"
|
||||
#include "utmp-api.h"
|
||||
|
||||
LIST_HEAD(, tty_node) tty_list = LIST_HEAD_INITIALIZER();
|
||||
|
||||
@@ -198,6 +199,9 @@ int tty_respawn(pid_t pid)
|
||||
if (!entry)
|
||||
return 0;
|
||||
|
||||
/* Set DEAD_PROCESS UTMP entry */
|
||||
utmp_set_dead(pid);
|
||||
|
||||
/* Clear PID to be able to respawn it. */
|
||||
entry->data.pid = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user