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

>  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.


Home | Main Index | Thread Index | Old Index