Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  5 Jun 1995 15:04:14 +0400 (MSD)
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" <ache@astral.msk.su>
To:        CVS-commiters@freefall.cdrom.com, Bruce Evans <bde@zeta.org.au>, cvs-sys@freefall.cdrom.com, davidg@freefall.cdrom.com
Subject:   Re: cvs commit: src/sys/kern tty.c
Message-ID:  <bBkIkqlCb2@astral.msk.su>
In-Reply-To: <199506050232.MAA12166@godzilla.zeta.org.au>; from Bruce Evans at Mon, 5 Jun 1995 12:32:56 %2B1000
References:  <199506050232.MAA12166@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bBkIkqlCb2>