Article View: comp.sys.sun
Article #12099Re: stty [-]nohang
From: Guy Harris
Date: Sat, 22 Apr 1989 05:06
Date: Sat, 22 Apr 1989 05:06
46 lines
2668 bytes
2668 bytes
>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.
An oversight, as I remember.
>This is the function that kills the control process if the remote carrier is
>dropped, thus logging out the faulted user and clearing the remote
>port.
Actually, "nohang" is the function that tells the system *not* to kill
the control process if the remote carrier is dropped. From the
4.3-tahoe TTY(4):
When the carrier signal from the dataset drops (usually
because the user has hung up his terminal) a SIGHUP hangup
signal is sent to the processes in the distinguished process
group of the terminal; this usually causes them to terminate.
The SIGHUP can be suppressed by setting the LNOHANG bit in the
local state word of the driver.
"stty -nohang" tells the system to send a SIGHUP to all processes in the
process group of the terminal (basically, all processes in the
foreground job, at least under a job-control shell; all processes in the
session, under a non-job-control shell) when carrier goes away. That
setting ("stty -nohang") is the default.
>An inquiry to some folks locally informed me that this option was present
>in Version 3. Can anyone point me to a way of ressurecting [-]nohang or
>achieving the same result another way?
"stty clocal" is basically equivalent to "stty nohang" (and "stty
-clocal" is equivalent to "stty -nohang"). "stty clocal" also has the
effect that an open on the port won't wait for carrier to come up (yes,
this does work - open the port no-delay, set "clocal", then do another
open; this trick is used on occasion in S5-land).
>Try looking at the "hupcl" option of stty. I believe you want
>"stty hupcl", but I've never verified that it actually works as
>advertised. --wnl
Not quite. "hupcl" is the one that works the other way around - it
controls whether carrier is dropped by the *local* machine when the last
process holding the tty closes it, not whether processes attached to the
tty are given a SIGHUP when carrier goes away.
[[ Whups! Well.....close anyway. --wnl ]]
Technical Details
Message-ID:
<1381@auspex.auspex.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rice!sun-spots-requestReferences:
<1455@cod.NOSC.MIL>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rice!sun-spots-request From: auspex!guy@uunet.uu.net (Guy Harris) Newsgroups: comp.sys.sun Subject: Re: stty [-]nohang Keywords: SunOS Message-ID: <1381@auspex.auspex.com> Date: 22 Apr 89 05:06:54 GMT References: <1455@cod.NOSC.MIL> Sender: usenet@rice.edu Organization: Auspex Systems, Santa Clara Lines: 46 Approved: Sun-Spots@rice.edu Original-Date: 4 Apr 89 07:32:54 GMT X-Sun-Spots-Digest: Volume 7, Issue 238, message 9 of 14