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
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