tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mkdir -p, autoconf



ignatios%cs.uni-bonn.de@localhost writes:

> On Fri, Oct 07, 2022 at 01:25:57PM -0400, Greg Troxel wrote:
>  
>> Sorry, I meant not documented in mkdir(1).
>
> "Create intermediate directories as required. ... 
> Do not consider it an error if the argument directory already
> exists."
>
> Hm... our implementation doesn't consider it an error if any
> intermediate directory in that path already exists; I'd argue
> that the "as required" part covers this.

The point is not that they exist, but that the program is robust against
something else creating them.  Given autoconf macros have concerns about
parallel execution, it's reasonable to expect

  if (!directory_exists())
    make_it()

and a possible returned error if it doesn't exist but then creation
fails.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index