Web lists-archives.com

Re: processing order for configuration files in /etc/network/interfaces.d




	Hi.

On Mon, Aug 27, 2018 at 09:08:19AM -0400, Greg Wooledge wrote:
> > Hm. Interfaces man page refers to wordexp(3), but this one doesn't say
> > anything about sorted results
> 
> In the absence of such information, the best thing to conclude is that
> the order is unspecified.  It may be using the raw unsorted directory
> contents from readdir(3), or it may be starting them all in parallel
> threads, in which case the order will be nondeterministic.

wordexp(3) invokes glob(3).

glob(3) states that one *needs* to specify GLOB_NOSORT to get resultes
pathnames in no particular order, as by default the result will be
sorted.

Unless I'm reading glibc source wrong, the only non-default argument
that wordexp(3) passes to glob(3) is GLOB_NOCHECK.

Reco