zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Joshua Krusell <js.shirin@gmail.com>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept()
Date: Mon, 10 Aug 2015 14:18:59 +0200	[thread overview]
Message-ID: <21555.1439209139@thecus.kiddle.eu> (raw)
In-Reply-To: <20150810102212.GA45526@Qliphoth.local>

Joshua Krusell wrote:
> -	{
> +	do {
> +	    rfd = accept(lfd, (struct sockaddr *)&soun, &len);
> +	} while (errno == EINTR && !errflag);

On success, errno is not set to zero. So if it happens to have a stray
value of EINTR before the loop, this could loop despite accept having
succeeded. Shouldn't rfd == -1 also be included in the condition?

Oliver


  parent reply	other threads:[~2015-08-10 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 10:22 Joshua Krusell
2015-08-10 11:33 ` Peter Stephenson
2015-08-10 12:18 ` Oliver Kiddle [this message]
2015-08-10 12:31   ` Peter Stephenson
2015-08-10 14:30   ` Joshua Krusell

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=21555.1439209139@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=js.shirin@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).