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

Collin Funk <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
Pádraig Brady <[email protected]> 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
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.