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