Multiple utmp entries: Howzit happen?
Rob Bernardo
rob at PacBell.COM
Fri Dec 15 00:00:46 AEST 1989
In article <519 at oglvee.UUCP> jr at oglvee.UUCP (Jim Rosenberg) writes:
+ It seemed pretty clear something was going wrong with
+/etc/utmp, and sure enough that proved to be the case. We keep getting (or
+should I say gettying?) just a couple or three tty lines with more than one
+entry in /etc/utmp. Here's an example:
...
+But the elm utilities wnewmail and from will no longer work right when
+the second utmp entry for tty12 materializes. (This is elm 2.1, 2.2 may fix
+this for all I know.)
This made shed some light on the matter.
The elm utility wnewmail (version 2.2) is a program that runs for the duration
of a login session. It knows to die when one of the following happen:
1. it receives a hangup signal, as is sent to all processes of
of terminal's process group when the user logs out.
2. getppid() returns 1, which is to say that the originating login
shell has gone away and the wnewmail process has taken on init
as its parent.
3. isatty(1) returns 0, which is to say standard output is not
a terminal (I don't quite see why this would *change* over the
course of the process running and it may only be a test that
would fail the first time it's tested).
It's possible that version 2.1 of wnewmail dies under #1 above as #2 and #3
were added in some recent version of ELM maybe after 2.1.
In any case, I presume that by your saying "wnewmail no longer works
right when the second utmp entry materializes", you mean wnewmail
terminates prematurely. Since wnewmail does not consult the utmp file
at all, then you may have a situation of whatever is wrong causing both the
utmp phenomenon and the wnewmail phenomenon separately, *not* a situation of
the utmp phenomenon causing the wnewmail phenomenon.
--
Rob Bernardo ...![backbone]!pacbell!pbhyf!rob -or- rob at pbhyf.PacBell.COM
Product engineer, UNIX/C Reusable Code Library Editor, "Go `C' UNIX"
Office: (415) 823-2417 Pacific * Bell, San Ramon, California
Residence: (415) 827-4301 R BAR JB, Concord, California
More information about the Comp.unix.wizards
mailing list