From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4154 invoked from network); 5 May 2000 09:11:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2000 09:11:26 -0000 Received: (qmail 12587 invoked by alias); 5 May 2000 09:11:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11181 Received: (qmail 12570 invoked from network); 5 May 2000 09:11:18 -0000 Date: Fri, 5 May 2000 11:10:51 +0200 (MET DST) Message-Id: <200005050910.LAA25069@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Fri, 5 May 2000 12:27:09 +0400 Subject: PATCH: Re: zpty read hangs (RE: nslookup (function) problem) 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