From robert@fledge.watson.org  Thu Apr 12 12:43:23 2001
Return-Path: <robert@fledge.watson.org>
Received: from fledge.watson.org (fledge.watson.org [204.156.12.50])
	by hub.freebsd.org (Postfix) with ESMTP id E8F1537B43F
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 12 Apr 2001 12:43:22 -0700 (PDT)
	(envelope-from robert@fledge.watson.org)
Received: (from robert@localhost)
	by fledge.watson.org (8.11.3/8.11.3) id f3CJaHZ09458;
	Thu, 12 Apr 2001 15:36:17 -0400 (EDT)
	(envelope-from robert)
Message-Id: <200104121936.f3CJaHZ09458@fledge.watson.org>
Date: Thu, 12 Apr 2001 15:36:17 -0400 (EDT)
From: rwatson@freebsd.org
Reply-To: rwatson@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: getpgid(2) doesn't describe error conditions for getpgid()
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26520
>Category:       docs
>Synopsis:       getpgid(2) doesn't describe error conditions for getpgid()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 12 12:50:01 PDT 2001
>Closed-Date:    Wed Apr 25 19:04:33 PDT 2001
>Last-Modified:  Wed Apr 25 19:05:10 PDT 2001
>Originator:     Robert Watson
>Release:        FreeBSD 4.3-RC i386
>Organization:
>Environment:
System: FreeBSD fledge.watson.org 4.3-RC FreeBSD 4.3-RC #0: Wed Apr 4 11:31:14 EDT 2001 robert@fledge.watson.org:/usr/obj/data/fbsd-stable/src/sys/FLEDGE i386

>Description:

Most system call man pages make an effort to describe potential error
return conditions for the call.  getpgid(2), however, neglects to note that
the returned pid can be (-1), indicating that errno should be inspected,
in the style of getsid(2).

>How-To-Repeat:

man 2 getpgid

>Fix:

Probably need to copy the relevant part of getsid(2) into getpgid(2).
However, this probably involves first consulting relevant specs defining
getpgid(2) to determine if our implementation complies or not.

>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: rwatson@freebsd.org
Cc: FreeBSD-gnats-submit@freebsd.org, bde@freebsd.org
Subject: Re: docs/26520: getpgid(2) doesn't describe error conditions for getpgid() 
Date: Fri, 13 Apr 2001 00:22:32 -0700

 [ cc'd to bde since he has (some copy of) the POSIX spec ]
 
 rwatson@freebsd.org writes:
 > Most system call man pages make an effort to describe potential error
 > return conditions for the call.  getpgid(2), however, neglects to note that
 > the returned pid can be (-1), indicating that errno should be inspected,
 > in the style of getsid(2).
 > 
 > >Fix:
 > 
 > Probably need to copy the relevant part of getsid(2) into getpgid(2).
 > However, this probably involves first consulting relevant specs defining
 > getpgid(2) to determine if our implementation complies or not.
 
 Bruce, can you check if this is true?  If that's the case, I'll fix
 the man page.
 
 Thanks,
 
 					Dima Dorfman
 					dima@unixfreak.org

From: Bruce Evans <bde@zeta.org.au>
To: Dima Dorfman <dima@unixfreak.org>
Cc: rwatson@freebsd.org, FreeBSD-gnats-submit@freebsd.org,
	bde@freebsd.org
Subject: Re: docs/26520: getpgid(2) doesn't describe error conditions for
 getpgid() 
Date: Fri, 13 Apr 2001 21:08:47 +1000 (EST)

 On Fri, 13 Apr 2001, Dima Dorfman wrote:
 
 > [ cc'd to bde since he has (some copy of) the POSIX spec ]
 > 
 > rwatson@freebsd.org writes:
 > > Most system call man pages make an effort to describe potential error
 > > return conditions for the call.  getpgid(2), however, neglects to note that
 > > the returned pid can be (-1), indicating that errno should be inspected,
 > > in the style of getsid(2).
 > > 
 > > >Fix:
 > > 
 > > Probably need to copy the relevant part of getsid(2) into getpgid(2).
 > > However, this probably involves first consulting relevant specs defining
 > > getpgid(2) to determine if our implementation complies or not.
 > 
 > Bruce, can you check if this is true?  If that's the case, I'll fix
 > the man page.
 
 SUSv2 says that getpgid() returns (pid_t)-1 and sets errno on error.
 
 (The cast is not really necessary in this case, unlike for ((time_t)-1),
 since -1 is small and pid_t is signed.)
 
 Bruce
 
State-Changed-From-To: open->analyzed 
State-Changed-By: dd 
State-Changed-When: Fri Apr 13 19:35:34 PDT 2001 
State-Changed-Why:  
Fixed in -current, thanks!  I'll MFC this after the code freeze. 


Responsible-Changed-From-To: freebsd-doc->dd 
Responsible-Changed-By: dd 
Responsible-Changed-When: Fri Apr 13 19:35:34 PDT 2001 
Responsible-Changed-Why:  
I'll MFC it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26520 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dd 
State-Changed-When: Wed Apr 25 19:04:33 PDT 2001 
State-Changed-Why:  
MFC'd. 

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