Bug 246366 - Unclear and/or wrong kevent vs EINTR manual
Summary: Unclear and/or wrong kevent vs EINTR manual
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 02:47 UTC by aler
Modified: 2020-05-11 02:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aler 2020-05-11 02:47:18 UTC
man kevent(2) says:

> Cancellation can only occur before any changes are made to the kqueue, or when the call was blocked and no changes to the queue were requested.

and

> [EINTR] A cancellation request was delivered to the thread, but not yet handled.
> When kevent() call fails with EINTR error, all changes in the changelist have been applied.

I think that both these statements can't be true at the same time, because the first says that kevent() can be cancelled BEFORE changes are made, and the second says that changes are always applied when EINTR that could be result of cancellation.

Another possibility is that this manpage is just very unclear about EINTR behaviour.

I don't know what case is right one but I'm sure that there is something wrong here.