Subject: Re: utmpx.h
To: Andrew Brown <atatat@atatdot.net>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 09/24/2001 13:51:26
On Sep 24,  1:46pm, atatat@atatdot.net (Andrew Brown) wrote:
-- Subject: Re: utmpx.h

| >| Exit codes and PIDs are VERY good (xref to process accounting, check for
| >| status, etc.).  I've missed both of these every time I've migrated a
| >| system with session accounting from SysV to *BSD.
| >
| >Pid is easy and might be useful. Who is responsible for writing out the
| >exit code? And how can that be done reliably?
| 
| presumably the thing that writes out the "close" record is doing so
| because some process has exited...no?  that's gonna be ftpd, telnetd,
| rlogind, sshd, or init, right?  i imagine that's about as reliable as
| anything.

Not always. Consider the scenario where I have in my .xinitrc

xterm &
exec twm

or

xterm &
twm &
wait

I don't expect twm or the shell to clean up utmp records...

And it is not just xterm; I could be running screen, and decided to kill -9
it.

christos