mgetty won't see the modem after the first call
Gert Doering (gert@greenie.muc.de)
Mon, 18 Oct 1999 14:54:35 +0200
Hi,
On Mon, Oct 18, 1999 at 02:46:43PM +0200, Eric Veldhuyzen wrote:
> > Then send the last few hundred lines of the output to us... (the part
> > showing the mgetty PID only).
>
> [some time later]
> Hmm... Is it possible that mgetty for some reason is very confused if
> the logfile it writes to isn't a real normal file but a named pipe? I
> just removed the named pipe that I was using for logging an replaced it
> with an empty file, and suddenly I can't reproduce the problem. And this
> is the only thing I've changed....
Ummm, yes, this explains things. The unix pipe semantics say "if you
open a named pipe for writing, the open() call blocks until another
process opens the pipe for reading". Most likely, the reader process
went away after the first mgetty died, and so there is no reader for the
second mgetty -> lockup in open().
> Then the only problem I will have is how I can get the logging to a
> remote system. The ram disk isn't big enough for logging locally.
I'll add a patch to have the log file name defined in the config file (I
don't really like this, but there is no way to solve your problem without
resorting to even more ugly things).
[Oh, as a side note: using the same file for different processes should
*not* be a problem. The log file is opened with O_APPEND, so all lines
should be appended atomically. Dunno whether that works over NFS...]
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert@greenie.muc.de
fax: +49-89-35655025 gert.doering@physik.tu-muenchen.de