[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] getty not restarted by init when dcd negated



The various problems with serial ports have definitely disappeared now
that I have removed the ST-ESCC test as explained in my previous message
to this mailing list. Because these problems have gone it has given me the
chance to observe another problem which appears to be unrelated to the
ST-ESCC detection.

I use vgetty to accept telephone calls to my modem, and both voice and fax
work fine, but there is a problem with data calls.

As I understand it the whole login process is like this:

A user would ring the modem and the modems would connect. Then vgetty
prints a login prompt, the caller sends its login name, and vgetty starts
login with this name as an argument. login then prompts for a password and
when it correct starts the user's shell. Finally when the user has
finished it hangs up and the shell exits. This causes init to restart
vgetty, and the process repeats.

However what happens in this case is that if the user hangs up the phone
at any point after the modems have connected, the procedure breaks down.
vgetty, login or the users shell does exit, but rather than vgetty being
restarted, another copy of init appears; i.e. if I type ps I will see two
init's listed - one with PID 1 and the other started just at the time the
user hung up. But vgetty is not restarted.

However if I switch the modem off, and then on again, the second copy of
init becomes vgetty and everything is back to normal.

On the other hand, vgetty (like mgetty) has an option to ignore carrier,
so that a dropped carrier will not abort the connection. This is useful if
the modem does not assert carrier detect at the correct time. If I enable
the ignore carrier option, then the problem does not occur. However it is
inadvisable to use this option for other reasons.

I think that what is happening is something like this. After the user
hangs up, the modem negates Carrier Detect (CD), which is what triggers
MiNT to send SIGHUP signal to the user's shell. However it would appear
that while CD is negated, init waits to restart vgetty. Perhaps the reason
is that it would not normally make sense to restart getty if there is no
carrier. But when I turned off the modem, perhaps the modem then asserts
CD (while it is turned off) and so init restarts vgetty. Of course with
the ignore carrier option enabled, init does not take notice of CD and
restarts vgetty anyway.

This hypothesis is not verified at all and may be entirely incorrect. But
it seems to make some sense to me.

Unfortunately I am not very familiar with the issues which are relevant to
this problem, and I have been unable to ascertain exactly why the problem
happens or what to do about it.

If anyone can help with this I would be most appreciative.

-- 
+-----------------------------------------------------------------------+
| Mario Becroft                * Tariland, New Zealand Atari User Group |
| mb@tos.pl.net                * Atari Hardware Developments            |
| http://www.ak.planet.gen.nz/~mario/ * Atari Serial Mouse Interface    |
+-----------------------------------------------------------------------+