From: Peter Stephenson <p.stephenson@samsung.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>, Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept()
Date: Mon, 10 Aug 2015 13:31:21 +0100 [thread overview]
Message-ID: <20150810133121.0df58da4@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <21555.1439209139@thecus.kiddle.eu>
On Mon, 10 Aug 2015 14:18:59 +0200
Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> 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?
Yes, you're right.
pws
next prev parent reply other threads:[~2015-08-10 12:41 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
2015-08-10 12:31 ` Peter Stephenson [this message]
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=20150810133121.0df58da4@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=okiddle@yahoo.co.uk \
--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).