From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24542 invoked from network); 20 Mar 2009 20:32:04 -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; 20 Mar 2009 20:32:04 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 75749 invoked from network); 20 Mar 2009 20:31:48 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Mar 2009 20:31:48 -0000 Received: (qmail 21618 invoked by alias); 20 Mar 2009 20:31:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13953 Received: (qmail 21605 invoked from network); 20 Mar 2009 20:31:30 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 20 Mar 2009 20:31:30 -0000 Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by bifrost.dotsrc.org (Postfix) with ESMTP id E537F82CF026 for ; Fri, 20 Mar 2009 21:31:26 +0100 (CET) Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090320203126.USBM7670.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Fri, 20 Mar 2009 20:31:26 +0000 Received: from pws-pc ([81.107.42.185]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090320203126.NNYU13254.aamtaout01-winn.ispmail.ntl.com@pws-pc> for ; Fri, 20 Mar 2009 20:31:26 +0000 Date: Fri, 20 Mar 2009 20:31:23 +0000 From: Peter Stephenson To: Zsh Users List Subject: Re: up-arrow no longer works right Message-ID: <20090320203123.3c7fc0fb@pws-pc> In-Reply-To: <200903202052.15787.arvidjaar@gmail.com> References: <090320073326.ZM3499@torch.brasslantern.com> <20090320151617.GF22844@prunille.vinc17.org> <200903202052.15787.arvidjaar@gmail.com> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=pGLkceISAAAA:8 a=4UtWO5riAAAA:8 a=NLZqzBF-AAAA:8 a=644LyroMtnZoId980y8A:9 a=ixHZvCZtYb7p6pV2yOUA:7 a=ayrU0c8uuibOO97tCvIIsPcf-McA:4 a=LY0hPdMaydYA:10 a=MSl-tDqOz04A:10 a=Shd8Sdw-9eQA:10 a=_dQi-Dcv4p4A:10 X-Virus-Scanned: ClamAV 0.92.1/9145/Fri Mar 20 15:59:16 2009 on bifrost X-Virus-Status: Clean On Fri, 20 Mar 2009 20:52:12 +0300 Andrey Borzenkov wrote: > Actually zsh explicitly contains code to retry failed system call: > > # ifdef HAVE_TCGETATTR > # ifndef TCSADRAIN > # define TCSADRAIN 1 /* XXX Princeton's include files are screwed up > */ > # endif > tcsetattr(SHTTY, TCSADRAIN, &ti->tio); > while (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1 && errno == > EINTR) > ; > # else > ioctl(SHTTY, TCSETS, &ti->tio); > while (ioctl(SHTTY, TCSETS, &ti->tio) == -1 && errno == EINTR) > # endif > /* zerr("settyinfo: %e",errno)*/ ; > > (looks like somewhat misplaced `;' but this should not be the reason). 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. Index: Src/utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/utils.c,v retrieving revision 1.214 diff -u -r1.214 utils.c --- Src/utils.c 15 Mar 2009 01:04:51 -0000 1.214 +++ Src/utils.c 20 Mar 2009 20:27:57 -0000 @@ -1442,14 +1442,13 @@ # ifndef TCSADRAIN # define TCSADRAIN 1 /* XXX Princeton's include files are screwed up */ # endif - tcsetattr(SHTTY, TCSADRAIN, &ti->tio); while (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1 && errno == EINTR) ; # else - ioctl(SHTTY, TCSETS, &ti->tio); 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); -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/