From rfg@monkeys.com  Mon Oct  2 13:11:56 2000
Return-Path: <rfg@monkeys.com>
Received: from monkeys.com (236.dsl9226.rcsis.com [63.92.26.236])
	by hub.freebsd.org (Postfix) with ESMTP id 4919F37B679
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  2 Oct 2000 13:11:10 -0700 (PDT)
Received: (from rfg@localhost)
	by monkeys.com (8.11.1/8.9.3) id e92KB4o79506;
	Mon, 2 Oct 2000 13:11:04 -0700 (PDT)
Message-Id: <200010022011.e92KB4o79506@monkeys.com>
Date: Mon, 2 Oct 2000 13:11:04 -0700 (PDT)
From: "Ronald F. Guilmette" <rfg@monkeys.com>
Reply-To: rfg@monkeys.com (Ronald F. Guilmette)
To: FreeBSD-gnats-submit@freebsd.org
Cc: rfg@monkeys.com
Subject: kqueue/kevent man pages isn't specific about `timeout'
X-Send-Pr-Version: 3.2

>Number:         21708
>Category:       docs
>Synopsis:       kqueue/kevent man pages isn't specific about `timeout'
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jmg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 02 13:20:00 PDT 2000
>Closed-Date:    Wed Dec 03 10:41:35 PST 2003
>Last-Modified:  Wed Dec 03 10:41:35 PST 2003
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 4.1-RELEASE i386
>Organization:
Infinite Monkeys & Co.
>Environment:

>Description:

	The man page for kqueue/kevent doesn't explicitly say what the
	semantics of the `timeout' parameter for the kqueue(2) function
	are.  Will a call to kqueue() timeout and return to the caller
	(with a return value of zero) when no currently-monitored events
	have occured for the amount of _elapsed_ time specified by the
	`timeout' parameter?  Or will a call to kqueue() timeout and return
	to the caller (with a return value of zero) if no monitored events
	have occured by the time the system's own clock says that we have
	reached the time specified by the `timeout' parameter?

	In short, is the `timeout' parameter for kevent(2) interpreted (by
	the kernel) as a _relative_ time period, or as an _absolute_ time
	specification?

	The kevent(2) man page does not make this clear.

>How-To-Repeat:

	RTFManpage

>Fix:

	Specify in the manpage that `timeout' is either (a) relative or else
	(b) absolute.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asmodai 
State-Changed-When: Tue Nov 21 07:22:51 PST 2000 
State-Changed-Why:  
Document the fact that the time parameter is interpreted as 
a struct timespec. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21708 
State-Changed-From-To: closed->open 
State-Changed-By: nik 
State-Changed-When: Tue Jun 26 14:36:46 PDT 2001 
State-Changed-Why:  
Jonathan, you're Mr. Kqueue :-). The question is (from a followup to the 
PR) 

== 
The problem is that it is not specified whether the timeout is treated 
as a _relative_ timespec or as an _absolute_ timespec. 

Just saying that it is a timespec does not resolve the issue. 

P.S.  My own experiments seem to indicate that the timeout value is 
treated as being _relative_ to the present moment, i.e. the moment 
at which the call to kevent(2) is actually made. 
== 

Comments? 


Responsible-Changed-From-To: freebsd-doc->jlemon 
Responsible-Changed-By: nik 
Responsible-Changed-When: Tue Jun 26 14:36:46 PDT 2001 
Responsible-Changed-Why:  
jlemon is Mr. kqueue 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21708 
State-Changed-From-To: open->feedback 
State-Changed-By: jmg 
State-Changed-When: Thu Nov 6 10:38:38 PST 2003 
State-Changed-Why:  
the documents say: 
If timeout is a non-NULL pointer, it specifies a maximum interval to wait 
interval to me implies relative.   If you disagree, please provide correct 
wording (you don't have to provide a patch, but that'd be very nice). 


Responsible-Changed-From-To: jlemon->jmg 
Responsible-Changed-By: jmg 
Responsible-Changed-When: Thu Nov 6 10:38:38 PST 2003 
Responsible-Changed-Why:  
the documents say: 
If timeout is a non-NULL pointer, it specifies a maximum interval to wait 
interval to me implies relative.   If you disagree, please provide correct 
wording (you don't have to provide a patch, but that'd be very nice). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21708 
State-Changed-From-To: feedback->closed 
State-Changed-By: jmg 
State-Changed-When: Wed Dec 3 10:41:04 PST 2003 
State-Changed-Why:  
guess the submitter doesn't disagree, close this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21708 
>Unformatted:
