NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: lib/53495: sched_get_priority_max/sched_get_priority_min not returning useful values
The following reply was made to PR lib/53495; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, Thomas Klausner <wiz%NetBSD.org@localhost>
Subject: re: lib/53495: sched_get_priority_max/sched_get_priority_min not returning useful values
Date: Fri, 03 Aug 2018 17:07:24 +1000
> This is not a bug. It works as intended.
>
> NetBSD behavior is compliant with POSIX and 3rd party program has to be
> fixed and handle the -1 case on its own, if there is need to distinguish
> error and unsupported, there is an option to reset errno and check it
> after the call.
this makes no sense to me. opengroup says:
If unsuccessful, they shall return a value of -1 and set errno
to indicate the error.
so "-1" can not be a useful value by definition. clearly our
implementation needs to map between internal values and ones
we return to these functions if "-1" is interanlly useful.
it's also extremely awful to introduce more APIs that abuse errno
like you suggest, and should not be done any time.
.mrg.
Home |
Main Index |
Thread Index |
Old Index