From owner-freebsd-stable@FreeBSD.ORG Thu Aug 7 11:39:49 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E042F37B404 for ; Thu, 7 Aug 2003 11:39:49 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D41243F85 for ; Thu, 7 Aug 2003 11:39:44 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h77Idafr049027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Aug 2003 21:39:37 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h77IdZRW049026; Thu, 7 Aug 2003 21:39:35 +0300 (EEST) (envelope-from ru) Date: Thu, 7 Aug 2003 21:39:35 +0300 From: Ruslan Ermilov To: Stephen McKay Message-ID: <20030807183935.GA45191@sunbay.com> References: <200308071230.h77CUMgj003099@dungeon.home> <20030807123242.GB5904@sunbay.com> <200308071308.h77D8Ogj003736@dungeon.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline In-Reply-To: <200308071308.h77D8Ogj003736@dungeon.home> User-Agent: Mutt/1.5.4i cc: freebsd-stable@freebsd.org Subject: Re: nvi dying with "Resource temporarily unavailable" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2003 18:39:50 -0000 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 07, 2003 at 11:08:24PM +1000, Stephen McKay wrote: > On Thursday, 7th August 2003, Ruslan Ermilov wrote: >=20 > >On Thu, Aug 07, 2003 at 10:30:22PM +1000, Stephen McKay wrote: > >> Since I upgraded to FreeBSD 4.8 (from 4.5) I've noticed occasional fai= lures > >> of nvi. It will suddenly die as a key is pressed, emitting: > >> > >> Error: input: Resource temporarily unavailable > >> > >> and you are staring at your command prompt. >=20 > >> Any ideas? >=20 > >stty sane >=20 > Eh? Which tty flag (out of the many affected by stty sane) do you believe > causes my problem? Why would my pty be "insane" in the first place? > Should nvi be defensive and handle this case? >=20 Hm, I cannot reproduce it "normally" now, but I recall seeing something like this. The problem is easily reproducible using this small program: : #include :=20 : int : main(void) : { : (void) fcntl(0, F_SETFL, O_NONBLOCK); : return (0); : } Assuming that it's called ./a.out, this works like this: : $ ./a.out ; vi : Error: input: Resource temporarily unavailable : sh: turning off NDELAY mode : $=20 Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --UlVJffcvxoiEqYs2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/MpznUkv4P6juNwoRAhXtAJ9FIbr06t8SIYtvv1ODL6PJL5YR5gCggFUo tUXG3xjjRKz7nrIjAGqxx0A= =h+AV -----END PGP SIGNATURE----- --UlVJffcvxoiEqYs2--