Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- X-seq: zsh-workers 36068
- From: Joshua Krusell <js.shirin@xxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- Date: Mon, 10 Aug 2015 16:30:05 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=1qxGf9ewiTOtDP+UAXqZa0il4X8DJPJGZPkkQkOgFu4=; b=XtOCfb0eIXBxSLbAXIHyUBjaFbAIpKgV6PDysjVJqtzdlsKidrIpHVElDHaoD0OIzI 57Nm6DhQRioK4ewr+srfmUrJ3ddaSEvjYv69CbFnJ63m9whRWOZlfOCulYBG0r7gySH1 Onu5n+Rx53EQl50LmxqFh3qTgTzV0NaNbAaXQbJdKT6+LWLzuNYKdwynKBdyDkHcAeUB vsRUL6s0UptzU83POY/gcDCtTR1+q0EBBc4FFBNP6V6M2AHovrLdqo1ITHunEWFbcWXv m9ve/InvJqg9VJNKdmEmKlpCeZw4U2ZbMC0wWMZUF21HRskVeyTEzlgh9kLADqZUG+Vi W5lw==
- 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>
- Mail-followup-to: Zsh workers <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150810102212.GA45526@Qliphoth.local> <21555.1439209139@thecus.kiddle.eu>
On 10/08/15 at 02:18P, Oliver Kiddle 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?
>
> Oliver
Right, of course...thanks!
/jsks
Messages sorted by:
Reverse Date,
Date,
Thread,
Author