From dm@home3.dinoex.sub.de  Mon Nov 16 05:56:48 2009
Return-Path: <dm@home3.dinoex.sub.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D81DC1065672
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Nov 2009 05:56:48 +0000 (UTC)
	(envelope-from dm@home3.dinoex.sub.de)
Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2])
	by mx1.freebsd.org (Postfix) with ESMTP id 64AAA8FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Nov 2009 05:56:48 +0000 (UTC)
Received: from home3.dinoex.sub.de (home3.dinoex.sub.de [194.45.71.20])
	by uucp.dinoex.sub.de (8.14.3/8.14.2) with ESMTP id nAG5uC4l047331
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Nov 2009 06:56:28 +0100 (CET)
	(envelope-from dm@home3.dinoex.sub.de)
Received: (from dm@localhost)
	by home3.dinoex.sub.de (8.14.3/8.14.3/Submit) id nAG5uCec061860;
	Mon, 16 Nov 2009 06:56:12 +0100 (CET)
	(envelope-from dm)
Message-Id: <200911160556.nAG5uCec061860@home3.dinoex.sub.de>
Date: Mon, 16 Nov 2009 06:56:12 +0100 (CET)
From: dirk.meyer@dinoex.sub.org
Reply-To: dirk.meyer@dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: getprogname.3 misleading
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         140594
>Category:       docs
>Synopsis:       getprogname.3 misleading
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 16 06:00:06 UTC 2009
>Closed-Date:    Mon Nov 16 17:11:39 CET 2009
>Last-Modified:  Mon Nov 16 17:11:39 CET 2009
>Originator:     Dirk Meyer
>Release:        FreeBSD 8.0-PRERELEASE
>Organization:
privat
>Environment:

FreeBSD libc manpage section 3.

>Description:

The manpage of getprogname seemms to contain an error.

[...]
     In FreeBSD, the name of the program is set by the start-up code that is
     run before main(); thus, running setprogname() is not necessary.  Pro-
     grams that desire maximum portability should still call it; on another
     operating system, these functions may be implemented in a portability
     library.  Calling setprogname() allows the aforementioned library to
     learn the program name without modifications to the start-up code.
[...]

I think the last part should be: 

Calling getprogname() allows  ...

>How-To-Repeat:

http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/getprogname.3
man getprogname

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brueffer 
State-Changed-When: Mon Nov 16 17:06:40 CET 2009 
State-Changed-Why:  
After consulting with kib, the manpage is correct.  The sentence 
you're citing means that calling setprogname() even though it is 
not needed on FreeBSD allows getprogname() implementations 
on other systems to retrieve and return the program name in any case. 

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