From owner-svn-src-head@FreeBSD.ORG Thu Sep 18 13:12:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE21FA58; Thu, 18 Sep 2014 13:12:21 +0000 (UTC) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16CFF278; Thu, 18 Sep 2014 13:12:20 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id l4so1106373lbv.16 for ; Thu, 18 Sep 2014 06:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=RZVeHw1jRGRKO5WnCZDHNAqQq6YcdNJ9gQzwo3kVi0M=; b=APaiKD0vHQjHRqYeICt73s6ZDlS+t8TzjkC+6lARzJZyx/CRWxYC+6BSHa0uzXV5rR OSAWE87ZVylBJFZw8IbFDEe8g4lrR0FCpAz2Kt/eDFN117KLeUm97CRxhVJGVXucsMwU nfdZFCIYyo7xnR04dWscnCq5Jtk1graq02fVQRUnbBkaxVuy81iwhB+RfX+96tiy1H+N KqYes4hrOrVSWfbwQ0MPg4G1YeCvuaHZQfgaEaHjUQgWdmSE+5G1fs63y1sBXr4LASLY 07wSb/qpM0X7C0x43KuDeKawiY+GZkxdm6HoKu9rJh9cQZh8Km0qUru1oMaoGNd+QE+6 Yk6Q== X-Received: by 10.112.14.33 with SMTP id m1mr4326450lbc.16.1411045938905; Thu, 18 Sep 2014 06:12:18 -0700 (PDT) Received: from pc5.home (aead216.neoplus.adsl.tpnet.pl. [79.186.3.216]) by mx.google.com with ESMTPSA id bm4sm6633782lbc.22.2014.09.18.06.12.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 06:12:18 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 18 Sep 2014 15:12:16 +0200 From: Edward Tomasz Napierala To: Konstantin Belousov Subject: Re: svn commit: r271753 - head/sys/fs/autofs Message-ID: <20140918131216.GA18337@pc5.home> Mail-Followup-To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409181033.s8IAXNZ1054205@svn.freebsd.org> <20140918112100.GS2161@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140918112100.GS2161@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 13:12:22 -0000 On 0918T1421, Konstantin Belousov wrote: > On Thu, Sep 18, 2014 at 10:33:23AM +0000, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Thu Sep 18 10:33:23 2014 > > New Revision: 271753 > > URL: http://svnweb.freebsd.org/changeset/base/271753 > > > > Log: > > Fix typos. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/sys/fs/autofs/autofs.c > > > > Modified: head/sys/fs/autofs/autofs.c > > ============================================================================== > > --- head/sys/fs/autofs/autofs.c Thu Sep 18 10:01:56 2014 (r271752) > > +++ head/sys/fs/autofs/autofs.c Thu Sep 18 10:33:23 2014 (r271753) > > @@ -430,7 +430,7 @@ autofs_trigger_one(struct autofs_node *a > > autofs_restore_sigmask(&oldset); > > if (error != 0) { > > /* > > - * XXX: For some reson this returns -1 > > + * XXX: For some reason this returns -1 > > * instead of EINTR, wtf?! > > */ > > error = EINTR; > > @@ -542,7 +542,7 @@ autofs_ioctl_request(struct autofs_daemo > > &autofs_softc->sc_lock); > > if (error != 0) { > > /* > > - * XXX: For some reson this returns -1 instead > > + * XXX: For some reason this returns -1 instead > > * of EINTR, wtf?! > > */ > > error = EINTR; > The -1 is ERESTART, i.e. it is correct error value which indicates that > syscall return path must restart the syscall after the trip to userland. > This behaviour is controlled by SA_RESTART flag, see sigaction(2). Ah, I didn't realize it's a valid error number. > There are some syscalls, which explicitely deny restarting, mostly to > correctly handle timeout values, most prominent is select(2) family. > > The comment above is definitely inappropriate, and translation of ERESTART > to EINTR may be wrong as well. The whole point of this is to fail the syscall with EINTR. However, I'm not sure what makes cv_wait_sig(9) to return with ERESTART instead of EINTR. Is SA_RESTART set by default?