From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6231 invoked from network); 25 Mar 2009 13:06:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Mar 2009 13:06:31 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 22540 invoked from network); 25 Mar 2009 13:06:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Mar 2009 13:06:20 -0000 Received: (qmail 4295 invoked by alias); 25 Mar 2009 13:06:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13968 Received: (qmail 4274 invoked from network); 25 Mar 2009 13:06:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Mar 2009 13:06:01 -0000 Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id 30E4A80590EB for ; Wed, 25 Mar 2009 14:05:55 +0100 (CET) Received: by prunille.vinc17.org (Postfix, from userid 501) id 4D32534F7E8D; Wed, 25 Mar 2009 14:05:55 +0100 (CET) Date: Wed, 25 Mar 2009 14:05:54 +0100 From: Vincent Lefevre To: Zsh Users List Subject: Re: up-arrow no longer works right Message-ID: <20090325130554.GA16740@prunille.vinc17.org> Mail-Followup-To: Zsh Users List References: <090320073326.ZM3499@torch.brasslantern.com> <20090320151617.GF22844@prunille.vinc17.org> <200903202052.15787.arvidjaar@gmail.com> <20090320203123.3c7fc0fb@pws-pc> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090320203123.3c7fc0fb@pws-pc> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.19-vl-r28329 (2009-03-19) X-Virus-Scanned: ClamAV 0.92.1/9164/Wed Mar 25 05:02:31 2009 on bifrost X-Virus-Status: Clean On 2009-03-20 20:31:23 +0000, Peter Stephenson wrote: > This was a fairly recent change, however. I'm not sure why the > tcsettattr() occurs twice, now I look again, but it's not occurring > twice in Vincent's trace, as it would with the new code. Older code > would print the message "bad tcgets", though. > > 2009-03-02 Peter Stephenson > > * Lionel Flandrin: 26625: Src/utils.c: inopportune interrupt > could wreck terminal set up. Thanks, this seems to fix the problem. Here's the patch modified for zsh 4.3.9: --- Src/utils.c.orig 2008-10-31 10:40:18.000000000 +0100 +++ Src/utils.c 2009-03-25 13:55:54.000000000 +0100 @@ -1437,13 +1437,13 @@ # ifndef TCSADRAIN # define TCSADRAIN 1 /* XXX Princeton's include files are screwed up */ # endif - tcsetattr(SHTTY, TCSADRAIN, &ti->tio); - /* if (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1) */ + while (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1 && errno == EINTR) + ; # else - ioctl(SHTTY, TCSETS, &ti->tio); - /* if (ioctl(SHTTY, TCSETS, &ti->tio) == -1) */ + while (ioctl(SHTTY, TCSETS, &ti->tio) == -1 && errno == EINTR) + ; # endif - /* zerr("settyinfo: %e",errno)*/ ; + /* zerr("settyinfo: %e",errno);*/ #else # ifdef HAVE_TERMIO_H ioctl(SHTTY, TCSETA, &ti->tio); -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)