misc/106414: getconf needs to check for 0, not -1, when checking for confstr errors

Guy Harris guy at alum.mit.edu
Wed Dec 6 02:51:25 PST 2006


>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:


More information about the freebsd-bugs mailing list