Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: up-arrow no longer works right
- X-seq: zsh-users 13968
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Zsh Users List <zsh-users@xxxxxxxxxx>
- Subject: Re: up-arrow no longer works right
- Date: Wed, 25 Mar 2009 14:05:54 +0100
- In-reply-to: <20090320203123.3c7fc0fb@pws-pc>
- Mail-followup-to: Zsh Users List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <d2ecb10b0903191838y68e1dfbbsa80289a52256eb2a@xxxxxxxxxxxxxx> <090320073326.ZM3499@xxxxxxxxxxxxxxxxxxxxxx> <20090320151617.GF22844@xxxxxxxxxxxxxxxxxxx> <200903202052.15787.arvidjaar@xxxxxxxxx> <20090320203123.3c7fc0fb@pws-pc>
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 <pws@xxxxxxx>
>
> * 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 <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author