From andrew@ugh.net.au  Sat Nov  3 22:11:22 2001
Return-Path: <andrew@ugh.net.au>
Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37])
	by hub.freebsd.org (Postfix) with ESMTP id 5F39637B405
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  3 Nov 2001 22:11:21 -0800 (PST)
Received: by starbug.ugh.net.au (Postfix, from userid 1000)
	id 3E1E1A854; Sun,  4 Nov 2001 17:11:19 +1100 (EST)
Message-Id: <20011104061119.3E1E1A854@starbug.ugh.net.au>
Date: Sun,  4 Nov 2001 17:11:19 +1100 (EST)
From: Andrew <andrew@ugh.net.au>
Reply-To: Andrew <andrew@ugh.net.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: describe handling of NULLs passed to pthread_setcancelstate
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31745
>Category:       docs
>Synopsis:       describe handling of NULLs passed to pthread_setcancelstate
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 03 22:20:00 PST 2001
>Closed-Date:    Sun Nov 18 08:47:41 PST 2001
>Last-Modified:  Sun Nov 18 08:48:00 PST 2001
>Originator:     Andrew
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
UgH!
>Environment:
System: FreeBSD starbug.ugh.net.au 4.4-STABLE FreeBSD 4.4-STABLE #3: Sun Oct 7 21:30:09 EST 2001 andrew@starbug.ugh.net.au:/usr/obj/usr/src/sys/STARBUG i386


	
>Description:

pthread_setcancelstate(3) does not describe the functions behaviour if passed
NULL as the second argument. The same with pthread_setcanceltype. In both cases
the argument is ignored.

>How-To-Repeat:
	
>Fix:

Patch to lib/libc_r/man/pthread_testcancel.3


--- pthread_testcancel.3.orig	Sun Nov  4 15:18:08 2001
+++ pthread_testcancel.3	Sun Nov  4 15:22:45 2001
@@ -23,7 +23,11 @@
 function atomically both sets the calling thread's cancelability state
 to the indicated
 .Fa state
-and returns the previous cancelability state at the location referenced by
+and, if
+.Fa oldstate
+is not
+.Dv NULL ,
+returns the previous cancelability state at the location referenced by
 .Fa oldstate .
 Legal values for
 .Fa state
@@ -37,7 +41,11 @@
 function atomically both sets the calling thread's cancelability type
 to the indicated
 .Fa type
-and returns the previous cancelability type at the location referenced by
+and, if
+.Fa oldtype
+is not
+.Dv NULL ,
+returns the previous cancelability type at the location referenced by
 .Fa oldtype .
 Legal values for
 .Fa type
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: murray 
State-Changed-When: Mon Nov 5 00:21:50 PST 2001 
State-Changed-Why:  
Your change has been committed in revision 1.8 of that file.  Thanks 
for the submission.  This change will be merged to -STABLE shortly. 



Responsible-Changed-From-To: freebsd-doc->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Mon Nov 5 00:21:50 PST 2001 
Responsible-Changed-Why:  
My MFC reminder. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31745 
State-Changed-From-To: analyzed->closed 
State-Changed-By: murray 
State-Changed-When: Sun Nov 18 08:47:41 PST 2001 
State-Changed-Why:  
Your change has been MFCed to -STABLE.  Thanks for the submission! 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31745 
>Unformatted:
