Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2006 10:10:23 GMT
From:      Guy Harris<guy@alum.mit.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/106414: getconf needs to check for 0, not -1, when checking for confstr errors
Message-ID:  <200612061010.kB6AANf8041948@www.freebsd.org>
Resent-Message-ID: <200612061040.kB6Ae3a7088644@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106414
>Category:       misc
>Synopsis:       getconf needs to check for 0, not -1, when checking for confstr errors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 06 10:40:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Guy Harris
>Release:        7.0-CURRENT
>Organization:
>Environment:
>Description:
In FreeBSD, confstr() has returned 0, rather than -1, on all errors for a while (that's the behavior the Single UNIX Specification requires); the documentation was recently fixed to reflect that.

As was pointed out in a response to a bug I filed on confstr() returning -1 in a different BSD, the getconf command needs to be changed to check for 0, not -1, in its confstr() call.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612061010.kB6AANf8041948>