NetBSD-Bugs archive

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

misc/57116: misleading description about timeout in poll man page



>Number:         57116
>Category:       misc
>Synopsis:       misleading description about timeout in poll man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 18 03:05:00 +0000 2022
>Originator:     YAMAMOTO Takashi
>Release:        NetBSD-current
>Organization:
>Environment:
https://man.netbsd.org/poll.2
>Description:
the man page says:

> If timeout is neither zero nor INFTIM (-1), it specifies a maximum
> inter-val to wait for any file descriptor to become ready, in
> milliseconds.

the text makes me think "it's ok to round it down".
but i believe it's the opposite.
ie. it's ok to sleep longer. but it isn't ok to sleep shorter.

see: https://github.com/yamt/toywasm/blob/42491d9274049490ee83b987498cf13430b890b0/lib/wasi.c#L811-L819

>How-To-Repeat:
man 2 poll
>Fix:



Home | Main Index | Thread Index | Old Index