On Sat, Jun 19, 2021 at 06:44:52AM -0700, Arthur Williams wrote: > util-linux explicitly > acknowledges it. From their sys-utils/flock.c: "Linux doesn't like O_CREAT > on a directory, even > though it should be a no-op;" So does *BSD, while we are at it. Out of curiosity - which more or less recent Unices do *not* behave that way? > And to their point, the man page for open > does seem to imply that: > O_CREAT > If pathname does not exist, create it as a regular file. > > But I can also see how it isn't completely clear since it doesn't > explicitly state what happens when > the file already exists. If this patch is to be rejected, would it be best > to > update the man pages/docs to explain the effect and justification for the > current behavior? *shrug* Quote POSIX in errors section, perhaps?