NetBSD-Bugs archive

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

misc/59246: clock_nanosleep return value audit



>Number:         59246
>Category:       misc
>Synopsis:       clock_nanosleep return value audit
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 02 02:50:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD_Nanosleep Erroration
>Environment:
>Description:
Unlike most system calls, clock_nanosleep returns an error code, rather than returning -1 and setting errno.

I have written some calls that got this wrong, e.g. using the RL macro in atf tests (check for -1, report errno) when it should use RZ.

Time to audit all the callers for this class of mistakes!
>How-To-Repeat:
code inspection
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index