From owner-freebsd-doc@FreeBSD.ORG Fri Mar 16 23:10:13 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55383106564A for ; Fri, 16 Mar 2012 23:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 439968FC0C for ; Fri, 16 Mar 2012 23:10:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2GNADMf086976 for ; Fri, 16 Mar 2012 23:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2GNADOW086975; Fri, 16 Mar 2012 23:10:13 GMT (envelope-from gnats) Date: Fri, 16 Mar 2012 23:10:13 GMT Message-Id: <201203162310.q2GNADOW086975@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Matthew Story Cc: Subject: Re: docs/166091: [libc][patch] fts(3) should document cases where FTS_NOCHDIR option is set as a side-effect X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthew Story List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2012 23:10:13 -0000 The following reply was made to PR docs/166091; it has been noted by GNATS. From: Matthew Story To: Jilles Tjoelker Cc: bug-followup@freebsd.org Subject: Re: docs/166091: [libc][patch] fts(3) should document cases where FTS_NOCHDIR option is set as a side-effect Date: Fri, 16 Mar 2012 19:02:47 -0400 --20cf3071cf260a2e7f04bb64357f Content-Type: text/plain; charset=ISO-8859-1 On Fri, Mar 16, 2012 at 6:38 PM, Jilles Tjoelker wrote: > > [fts(3) automatically sets FTS_NOCHDIR option in some cases] > > I consider the automatic FTS_NOCHDIR a semi-bug that should not be > relied on. I agree with this, but as the behavior is non-obvious I think it should be noted. Perhaps this is more appropriate for the BUGS section than the fts_open section? > If FTS_NOCHDIR is set, fts(3) runs slower and is subject to > {PATH_MAX}. The latter would violate POSIX in various utilities. > this would mean that find -L is currently in violation of POSIX? I tried to allow FTS_LOGICAL without FTS_NOCHDIR a while ago, but while > it is conceptually possible, actually making it work is hard. > Is anyone currently looking into this? > > The open(".", O_RDONLY) can use O_SEARCH when it is added (for now, > O_EXEC works) so it only needs 'x' right not also 'r'. > So this would then fall back to FTS_NOCHDIR if `.' is not searchable? > > -- > Jilles Tjoelker > -- regards, matt --20cf3071cf260a2e7f04bb64357f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2012 at 6:38 PM, Jilles Tjoelker <jilles@stack.nl> wrote:
> [fts(3) automatically sets FTS_NOCHDIR option in some cases]

I consider the automatic FTS_NOCHDIR a semi-bug that should not be
relied on.

I agree with this, but as the be= havior is non-obvious I think it should be noted. =A0Perhaps this is more a= ppropriate for the BUGS section than the fts_open section?
=A0
If FTS_NOCHDIR is set, fts(3) runs slower a= nd is subject to
{PATH_MAX}. The latter would violate POSIX in various utilities.

this would mean that find -L is currently in viol= ation of POSIX?

I tried to allow FTS_LOGICAL without FTS_NOCHDIR a while ago, but while
it is conceptually possible, actually making it work is hard.

Is anyone currently looking into this?
=A0=

The open(".", O_RDONLY) can use O_SEARCH when it is added (for no= w,
O_EXEC works) so it only needs 'x' right not also 'r'.
<= /blockquote>

So this would then fall back to FTS_NOCHDIR= if `.' is not searchable?=A0
=A0

--
Jilles Tjoelker



-- regards,
matt
--20cf3071cf260a2e7f04bb64357f--