bug-coreutils
[Top][All Lists]
Advanced

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

bug#79232: tsort doesn't support -w added by POSIX 2024.


From: Collin Funk
Subject: bug#79232: tsort doesn't support -w added by POSIX 2024.
Date: Thu, 14 Aug 2025 09:40:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

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

>> I have attached a proposed patch.
>> I followed the POSIX recommendation of using the exit status 0 - 124
>> for
>> the number of cycles and 125 for program errors (e.g. closing standard
>> output).
>
> -w seems a bit arbitrary to standardize since I only see it in OpenBSD:
> https://manned.org/man/openbsd-7.7/tsort
> Also exit status is a weird interface to propagate numbers,
> with various limitations and overlaps.

Agreed. I guess for most uses of tsort the number of cycles is less than
that. But arbitrary limits are annoying.

Using GNU tsort, one can count the number of 'input contains a loop'
messages printed to standard error to get the number of cycles without
an arbitrary limit.

Collin





reply via email to

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