Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: zpty read hangs (RE: nslookup (function) problem)
- X-seq: zsh-workers 11181
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: zpty read hangs (RE: nslookup (function) problem)
- Date: Fri, 5 May 2000 11:10:51 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Fri, 5 May 2000 12:27:09 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author