Comment 38 for bug 183729

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

what do you think about this:

create something called utmp-helper (compat/sysv/utmp-helper.c) with usage:

utmp-helper --id <terminal suffix> -- <command for what we need utmp handling>

utmp-helper will do fork(), in child it will save pid of new process, id and INIT_PROCESS to utmp table, call setsid() for controlling tty and execv() to <command for what we need utmp handling>, in parrent it will wait() until child terminates, then set DEAD_PROCESS into utmp table and log to wtmp log.

and then exec line in /etc/event.d/tty* will be changed to:
exec utmp-helper --id 1 -- /sbin/mingetty tty1