stty [-]nohang?

Michael G. Beirne beirne at richsun.reuter.com
Tue Apr 25 05:20:37 AEST 1989


In article <1455 at cod.NOSC.MIL> you write:
>X-Sun-Spots-Digest: Volume 7, Issue 221, message 9 of 12
>
>I'm a new SUN user and just brought up a 3/60 with Version 4.0.  To my
>surprise, the stty option [-]nohang was conspicuous by its absence.  This
>-- 
>David I. Berg (dberg at nosc.mil)

>[[ Try looking at the "hupcl" option of stty.  I believe you want
>"stty hupcl", but I've never verified that it actually works as
  ^^^^^^^^^^

This is wrong.  hupcl means "hang up on close" or "hang up modem(drop DTR
line) on close of terminal controlling process. The correct way is to stty
-clocal which means assume a line with modem control(Carrier detect).
What this should do when the carrier drops from the modem is send a
HANGUP(HUP) signal to the terminal controlling process which should log
the person off.  This prevents the security problem of the next person
calling in, getting the previous person's session.  It also permits some
recovery if the current session locks up.  The old process gets killed off
when you hangup and you can call up and try it again.

Under system V the best place to set this is in the gettydefs. That way
you set up the inittab to use one entry for modems, that has modem control
enabled and another for terminals that has it disabled. This should allow
you to use 3 wire connections(2,3,and 7) for terminals and 9 wire
connections(1,2,3,4,5,6,7,8, and 20) for modems.

This is not an option to getty for SunOS 4.0.1 or for SunOS 3.5 for that
matter.  It seems to be in the tty device driver itself.  I know that
for the modems to work correctly here, I had to change the flags line
of the device mcp to:
device		mcp0 at vme32d32 ? csr 0x01000000 flags 0x1fff0 priority 4
This change allows the first four ports to be for modems.     ^
The default is for terminal lines on all the ALM ports. Then we relinked and
installed the new vmunix.

Michael G. Beirne
beirne at richp1.UUCP,beirne at richsun.reuter.COM or beirne at limerick.chi.il.us



More information about the Comp.sys.sun mailing list