From owner-freebsd-commit Mon Jun 5 04:10:32 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA19228 for commit-outgoing; Mon, 5 Jun 1995 04:10:32 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA19156 for cvs-sys-outgoing; Mon, 5 Jun 1995 04:09:07 -0700 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id EAA19143 ; Mon, 5 Jun 1995 04:08:50 -0700 Received: by sequent.kiae.su id AA09590 (5.65.kiae-2 ); Mon, 5 Jun 1995 15:05:27 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Mon, 5 Jun 95 15:05:25 +0400 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id PAA00700; Mon, 5 Jun 1995 15:04:15 +0400 To: CVS-commiters@freefall.cdrom.com, Bruce Evans , cvs-sys@freefall.cdrom.com, davidg@freefall.cdrom.com References: <199506050232.MAA12166@godzilla.zeta.org.au> In-Reply-To: <199506050232.MAA12166@godzilla.zeta.org.au>; from Bruce Evans at Mon, 5 Jun 1995 12:32:56 +1000 Message-Id: Organization: Olahm Ha-Yetzirah Date: Mon, 5 Jun 1995 15:04:14 +0400 (MSD) X-Mailer: Mail/@ [v2.37 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA?= =?KOI8-R?Q?=FE=C5=D2=CE=CF=D7?= aka "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: Re: cvs commit: src/sys/kern tty.c Lines: 62 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2168 Sender: commit-owner@FreeBSD.org Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- In message <199506050232.MAA12166@godzilla.zeta.org.au> Bruce Evans writes: >> Modified: sys/kern tty.c >> Log: >> Restore Andrew's change in rev 1.44 for t_timeout. I can't see how that >> could have caused PR 445 unless the user specifically mis-configured >> 'comcontrol' in rc.serial. t_timeout is only set/cleared via the >> TIOCSDRAINWAIT ioctl and defaults to 0. >> >> Reviewed by: Andrew Chernov >I haven't reviewed Andrey's comments yet :-(. >Of course the user must have mis-configured dtrwait. It isn't ^^^^^^^ drainwait >documented anywhere that using dtrwait may break the non-blocking ^^^^^^^ drainwait >behaviour of writes to ttys. >Bruce Bruce, at this stage only critical bugfix allowed. Your fix not close PR, correct way to close it is not use t_timeout or set it to some big value, f.e. 5-10 mins. Your fix is questionable and need discussion: I dislike your idea of having two separate timeouts for modem hang, I prefer one big timeout for all modem hangs on writes. Modem hang is one state and we don't need two or more timeouts to handle it differently on exit and on writes, it is unneded complexity. I agree with you that right now not all places checked and left this work until after release time. I agree with you that non-blocking writes can't return EWOULDBLOCK, as correct fix I suggest to change EWOULDBLOCK to EIO. Right after tsleep: if (error == EWOULDBLOCK) error = EIO; Bruce and David, please review this thing for commit as fixing wrong error return code of write. - -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849 -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBL9Lkq+JgpPLZnQjrAQHmggP7BImGYocpSBwKEFyu0TIArPWSow2eoWSR KZfvbsDgB8pJU+bee8QWfLiJLqwEngdom8xAH26RjW5Ezng6LcHzIUJ4McNvPZ0C KpOpeht6ZWk0dU/DYvuWNngImdrAMOg27Ffkk+V2B7vYDthRYoVZyOgTu6CXLj7q V21IfGI2DRk= =dKqg -----END PGP SIGNATURE-----