Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Solved] Re: Terminal problem with linux-2.0.34



Ville Herva wrote:
> This proved to be the select call in line 517 in Zle/zle_main.c (zsh-3.1.5
> vanilla):       
>                 
>                 if (!kungetct && select(SHTTY+1, (SELECT_ARG_2_T) & foofd,
>                                         NULL, NULL, &tv) <= 0)
> 
> If I add the following line before the above call, zsh works well:
>                 
>                 tv.tv_sec = 0;

Thanks, this is the diff for 3.1.5-pws-16 (Bart's already put something into
3.0.6).

--- Src/Zle/zle_main.c.tv	Mon Apr 19 11:40:09 1999
+++ Src/Zle/zle_main.c	Wed Apr 28 09:48:30 1999
@@ -413,7 +413,6 @@
 
     baud = getiparam("BAUD");
     costmult = (baud) ? 3840000L / baud : 0;
-    tv.tv_sec = 0;
 #endif
 
     /* ZLE doesn't currently work recursively.  This is needed in case a *
@@ -523,6 +522,7 @@
 #ifdef HAVE_SELECT
 	    if (baud && !(lastcmd & ZLE_MENUCMP)) {
 		FD_SET(SHTTY, &foofd);
+		tv.tv_sec = 0;
 		if ((tv.tv_usec = cost * costmult) > 500000)
 		    tv.tv_usec = 500000;
 		if (!kungetct && select(SHTTY+1, (SELECT_ARG_2_T) & foofd,

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author