Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: beirne@richsun.reuter.com (Michael G. Beirne) Newsgroups: comp.sys.sun Subject: Re: stty [-]nohang? Keywords: SunOS Message-ID: <280@richsun.UUCP> Date: 24 Apr 89 19:20:37 GMT References: <1455@cod.NOSC.MIL> Sender: usenet@rice.edu Organization: RICH Inc. , Franklin Park,IL Lines: 39 Approved: Sun-Spots@rice.edu Original-Date: 4 Apr 89 23:03:58 GMT X-Sun-Spots-Digest: Volume 7, Issue 244, message 3 of 10 In article <1455@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@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@richp1.UUCP,beirne@richsun.reuter.COM or beirne@limerick.chi.il.us