From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9541 invoked by alias); 10 Aug 2015 14:30:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36068 Received: (qmail 26320 invoked from network); 10 Aug 2015 14:30:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 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== X-Received: by 10.152.179.170 with SMTP id dh10mr2964188lac.22.1439217015141; Mon, 10 Aug 2015 07:30:15 -0700 (PDT) Date: Mon, 10 Aug 2015 16:30:05 +0200 From: Joshua Krusell To: Zsh workers Subject: Re: PATCH: ignore EINTR in ztcp/zsocket accept() Message-ID: <20150810143005.GA46450@Qliphoth.local> Mail-Followup-To: Zsh workers References: <20150810102212.GA45526@Qliphoth.local> <21555.1439209139@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21555.1439209139@thecus.kiddle.eu> User-Agent: Mutt/1.5.23 (2014-03-12) 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