From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11319 invoked from network); 2 Feb 2000 08:32:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Feb 2000 08:32:08 -0000 Received: (qmail 11157 invoked by alias); 2 Feb 2000 08:32:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9522 Received: (qmail 11150 invoked from network); 2 Feb 2000 08:32:02 -0000 Date: Wed, 2 Feb 2000 09:32:01 +0100 (MET) Message-Id: <200002020832.JAA09945@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Tue, 01 Feb 2000 18:45:18 +0000 Subject: Re: Problems with trap handling? Peter Stephenson wrote: > ... > > > > We could either test retflag/breaks/contflag there or give it a flag > > that says to stop in case of EINTR and which would be set by bin_read > > (via getquery()). > > I think the answer is it should be testing more flags at this point: > whatever's making the function return (i.e. retflag) should make the read > return, too. It's certainly correct that EINTR shouldn't make it return --- > the problem was that the query aborted if, say, a background job exited, > and as far as I can see the same issue applies to any call to read1char(). > It's quite possible the same issue comes up at umpteen other places in the > code, alas. Exactly what I'm fearing, too. Anybody know of any other almost-endless loops in the code? Bye Sven diff -ru ../z.old/Src/utils.c Src/utils.c --- ../z.old/Src/utils.c Tue Feb 1 14:47:39 2000 +++ Src/utils.c Wed Feb 2 09:30:29 2000 @@ -1300,7 +1300,7 @@ char c; while (read(SHTTY, &c, 1) != 1) { - if (errno != EINTR || errflag) + if (errno != EINTR || errflag || retflag || breaks || contflag) return -1; } return STOUC(c); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de