Date: Thu, 18 Sep 2014 15:12:16 +0200 From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r271753 - head/sys/fs/autofs Message-ID: <20140918131216.GA18337@pc5.home> In-Reply-To: <20140918112100.GS2161@kib.kiev.ua> References: <201409181033.s8IAXNZ1054205@svn.freebsd.org> <20140918112100.GS2161@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140918131216.GA18337>