Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- X-seq: zsh-workers 36042
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Joshua Krusell <js.shirin@xxxxxxxxx>
- Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept()
- Date: Mon, 10 Aug 2015 14:18:59 +0200
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1439209140; bh=HxeN4CsJKaYMUQCqv3kkyBVt8my4QeY0HMTshZJnhys=; h=In-reply-to:From:References:To:cc:Subject:Date:From:Subject; b=ldKBM626ZDFbh65xTKRQ98xai7T7Q8W5gxbXxTGfaTl6NS91Gbj7GRhGChmRGcBPmay+7dqe31neuIN4j8OA/a4q/wzoZJeZj87kXVDNYin8HLTMfL4bnEef0po0uVrhlRX4dwlfv3sxSIAr1ZkEv2dByBAI1NQraaNoyxqsrGQZFVwlGtfciXQDkmi2speXE/+1GzIYeUYPp5Vj/CPTxjkG11ULENkPBbUwaoNIUVs2ym24M7rZZpo6uI2S2rYq6DG+NYqSHHbVi5wPj98NzlZPSkUewfB1j68RtEPhvQOV+tsY/w1zcjp6ZnXKKzo8ScBxWGHQn5eGUK2ki7GZiw==
- In-reply-to: <20150810102212.GA45526@Qliphoth.local>
- 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
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author