Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- X-seq: zsh-workers 36043
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>, Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- Date: Mon, 10 Aug 2015 13:31:21 +0100
- In-reply-to: <21555.1439209139@thecus.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20150810102212.GA45526@Qliphoth.local> <21555.1439209139@thecus.kiddle.eu>
On Mon, 10 Aug 2015 14:18:59 +0200
Oliver Kiddle <okiddle@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author