zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: zpty read hangs (RE: nslookup (function) problem)
@ 2000-05-05  9:10 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-05-05  9:10 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> > > Unfortunately, function nslookup hangs completely in this case:
> > >
> > > bor@itsrm2% autoload -U nslookup
> > > bor@itsrm2% nslookup
> > > Default Server:  mowd017a.mow.siemens.ru
> > > Address:  139.24.18.1
> > >
> > > > ?
> > > nothing comes here; it habgs; it is no more possible to
> > kill it with ^C,
> > > ^\ or ^Z.
> 
> I want to stress it - in this case zsh *hangs* - there is no way to
> break out of 'zpty -r'. That is unacceptable, even more so for
> interactive shell.

I was wondering about this, because I had changed it to test
errflag. But nslookup traps SIGINT, so we have to use the same test as 
in a normal read...

Bye
 Sven

Index: Src/Modules/zpty.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zpty.c,v
retrieving revision 1.5
diff -u -r1.5 zpty.c
--- Src/Modules/zpty.c	2000/05/04 13:40:06	1.5
+++ Src/Modules/zpty.c	2000/05/05 09:09:31
@@ -486,7 +486,7 @@
 
 	if (!prog && !ret)
 	    break;
-    } while (!errflag &&
+    } while (!errflag && !breaks && !retflag && !contflag &&
 	     (prog ? (used < READ_MAX && (!ret || !pattry(prog, buf))) :
 	      (used < READ_LEN)));
 

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-05  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-05  9:10 PATCH: Re: zpty read hangs (RE: nslookup (function) problem) Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).