From owner-freebsd-commit Mon Jun 5 04:48:54 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA21449 for commit-outgoing; Mon, 5 Jun 1995 04:48:54 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA21245 for cvs-sys-outgoing; Mon, 5 Jun 1995 04:47:25 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA21226 ; Mon, 5 Jun 1995 04:47:16 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id VAA28604; Mon, 5 Jun 1995 21:43:44 +1000 Date: Mon, 5 Jun 1995 21:43:44 +1000 From: Bruce Evans Message-Id: <199506051143.VAA28604@godzilla.zeta.org.au> To: ache@astral.msk.su, bde@zeta.org.au, cvs-sys@freefall.cdrom.com, davidg@freefall.cdrom.com Subject: Re: cvs commit: src/sys/kern tty.c Sender: commit-owner@FreeBSD.org Precedence: bulk >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. We need separate timeouts to minimize breaking of standards. POSIX specifies that write() to any devices that supports blocking writes shall block if O_NONBLOCK is clear. We are already beyond the standard from supporting CRTSCTS (which allows ininite blockage) and drainwait (which allows canceling the infinite blockage). I want writes to block forever and exits not to block forever. Timeouts are a reasonable way of controlling the behaviour. >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. It's too close to release to decide. You've been testing long enough with error EWOULDBLOCK to notice serious problems with it. Bruce