zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Problems with trap handling?
Date: Wed, 2 Feb 2000 09:32:01 +0100 (MET)	[thread overview]
Message-ID: <200002020832.JAA09945@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 01 Feb 2000 18:45:18 +0000


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


             reply	other threads:[~2000-02-02  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-02  8:32 Sven Wischnowsky [this message]
2000-02-02 15:14 ` James Kirkpatrick
  -- strict thread matches above, loose matches on Subject: below --
2000-02-02 15:30 Sven Wischnowsky
2000-02-02 16:11 ` Bart Schaefer
2000-01-31 12:07 Sven Wischnowsky
2000-02-01 18:45 ` Peter Stephenson
2000-01-30 18:47 Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200002020832.JAA09945@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).