bug#62385: POSIX behavior of readlink, realpath

Pádraig Brady <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 03/08/2025 19:08, Collin Funk wrote:
> Hi Pádraig,
> 
> Pádraig Brady <[email protected]> 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.

Looks good.

thanks!
Padraig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.