Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2002 01:08:14 +0100 (CET)
From:      Matthias Andree <matthias.andree@web.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   standards/45738: sh "unset" built-in violates IEEE Std 1003.1-2001. 
Message-ID:  <200211260008.gAQ08EVh007455@libertas.emma.line.org>

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

>Number:         45738
>Category:       standards
>Synopsis:       sh "unset" built-in violates IEEE Std 1003.1-2001.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-standards
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 25 16:10:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Andree
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 4.7-STABLE FreeBSD 4.7-STABLE #1: Wed Nov 20 15:38:48 CET 2002 toor@libertas.emma.line.org:/usr/obj/usr/src/sys/LIBERTAS i386 
        
>Description:
FreeBSD /bin/sh violates IEEE Std 1003.1-2001 when unsetting an undefined
variable or function in that it flags error. The standard requires that
unsetting an unset variable or function will NOT be treated as an error.

See http://www.opengroup.org/onlinepubs/007904975/utilities/unset.html
        
>How-To-Repeat:
/bin/sh -c 'set -e ; BONK= ; unset BONK ; unset BONK ; echo good'
/bin/sh -c 'set -e ; f() {} ; unset -f f ; unset -f f ; echo good'

If either test prints nothing, it's broken.
If either test prints good, it's fine.
        
>Fix:

        


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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




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