Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA01721; Wed, 13 Dec 95 19:11:00 EST
Received: from halloran-eldar.lcs.mit.edu by MIT.EDU with SMTP
	id AA04524; Wed, 13 Dec 95 19:11:04 EST
Received: from freefall.FreeBSD.ORG by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM)
	id AA12116; Wed, 13 Dec 1995 19:06:34 -0500
Received: from localhost (daemon@localhost)
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA28943
          Wed, 13 Dec 1995 14:07:14 -0800 (PST)
Received: (from root@localhost)
          by freefall.freebsd.org (8.7.3/8.7.3) id OAA28720
          for hackers-outgoing; Wed, 13 Dec 1995 14:03:05 -0800 (PST)
Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA28702
          for <hackers@FreeBSD.ORG>; Wed, 13 Dec 1995 14:02:46 -0800 (PST)
Received: by sequent.kiae.su id AA05120
  (5.65.kiae-2 ); Thu, 14 Dec 1995 00:49:29 +0300
Received: by sequent.KIAE.su (UUMAIL/2.0); Thu, 14 Dec 95 00:49:28 +0300
Received: (from ache@localhost) by ache.dialup.ru (8.7.3/8.7.3) id AAA00854; Thu, 14 Dec 1995 00:48:28 +0300 (MSK)
To: Bruce Evans <bde@zeta.org.au>, Terry Lambert <terry@lambert.org>
Cc: eugen@rd.zgik.zaporizhzhe.ua, hackers@freebsd.org,
        yura@rd.zgik.zaporizhzhe.ua
References: <199512131818.LAA03398@phaeton.artisoft.com>
    <Wb06ppmuW2@ache.dialup.ru>
In-Reply-To: <Wb06ppmuW2@ache.dialup.ru>;
    from =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=
    at Wed, 13 Dec 1995 23:03:12 +0300 (MSK)
Message-Id: <bbheqpmuq3@ache.dialup.ru>
Organization: Olahm Ha-Yetzirah
Date: Thu, 14 Dec 1995 00:48:27 +0300 (MSK)
X-Mailer: Mail/@ [v2.41 FreeBSD]
From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=
    (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su>
X-Class: Fast
Subject: Re: bug or feature in kern/tty.c
Lines: 41
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-hackers@freebsd.org
Precedence: bulk

In message <Wb06ppmuW2@ache.dialup.ru>
    =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= writes:

>In message <199512131818.LAA03398@phaeton.artisoft.com> Terry Lambert
>    writes:

>>> >I found strange thing in 2.1.0-RELEASE (and -current) in kern/tty.c.
>>> >When carrier was lossed then ttymodem() set TS_ZOMBIE and clear
>>> >TS_CONNECTED in tp->t_state. But TS_ZOMBIE is cleared only in ttioctl()
>>> >TIOCSETA* when line is setted to ignore modem status and when line is closed.
>>> 
>>> POSIX says that (what I call the) zombie state remains until the line is
>>> closed.  Clearing it when CLOCAL is raised is a special hack that helped
>>> very old (1.1.5) versions of slattach and perhaps other broken programs
>>> work right.

>>FYI: Of the 120 or so UNIX systems I ported TERM to while I was
>>at Century Software, only SCO Xenix 2.3.0 behaved this way, and they
>>fixed it in 2.3.1 after we reported the bug.

>BTW, it seems we talk about different things. As I understand the original
>problem, the question is: WHY SLATTACH NOT RECONNECTS WHEN CARRIER
>ESTABLISHED AGAIN (AUTOMATICALLY BY MODEM)?

>I.e.
>1) driver needs to track carrier when in TS_ZOMBI and
>set TS_CONNECTED, clear TS_ZOMBI when carrier
>appearse on the line.
>2) Slattach not need exit on SIGHUP but wait reasonable time
>until carrier will be up again.

I mean of course that CLOCAL turned on, i.e. slattach only
controls line and establish carrier on them, not other
program. So partial question is: is it possible to fix sio to send
SIGHUP to controlling terminal even when CLOCAL is set?

-- 
Andrey A. Chernov        : And I rest so composedly,  /Now, in my bed,
ache@astral.msk.su       : That any beholder  /Might fancy me dead -
http://dt.demos.su/~ache : Might start at beholding me,  /Thinking me dead.
RELCOM Team,FreeBSD Team :         E.A.Poe         From "For Annie" 1849
