bug-coreutils
[Top][All Lists]
Advanced

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

bug#62385: POSIX behavior of readlink, realpath


From: Collin Funk
Subject: bug#62385: POSIX behavior of readlink, realpath
Date: Sun, 03 Aug 2025 11:08:01 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Hi PƔdraig,

PƔdraig Brady <P@draigBrady.com> writes:

> I'd say any option apart from -n implicitly disables strict POSIX conformance,
> since those options are not in POSIX at all.

It seems like this was my misunderstanding. I thought non-POSIX options
couldn't change:

    If file does not name a symbolic link, readlink shall write a
    diagnostic message to standard error and exit with non-zero status.

But I like the behavior you and Dmitry suggest better.

> So all I'd do is enable -v if POSIXLY_CORRECT is set. There is the
> argument for defaulting to -v, but I see FreeBSD does not output an
> error either if file is not a symlink, so it's probably best to only
> enable -v if POSIXLY_CORRECT is set.
>
> In NEWS this should be under "Changes in behavior" rather than "New Features".

Done, v2 attached.

Collin

Attachment: v2-0001-readlink-emit-errors-when-POSIXLY_CORRECT-is-set.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]