From owner-freebsd-standards Mon Nov 25 16:10: 4 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A7EC37B401 for ; Mon, 25 Nov 2002 16:10:03 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC64B43EC5 for ; Mon, 25 Nov 2002 16:10:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAQ0A1x3033110 for ; Mon, 25 Nov 2002 16:10:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAQ0A1TA033109; Mon, 25 Nov 2002 16:10:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C6EC37B401 for ; Mon, 25 Nov 2002 16:08:26 -0800 (PST) Received: from mail.dt.e-technik.uni-dortmund.de (krusty.dt.E-Technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A110743E9C for ; Mon, 25 Nov 2002 16:08:25 -0800 (PST) (envelope-from matthias.andree@web.de) Received: from m2a2.yi.org (krusty.dt.e-technik.uni-dortmund.de [129.217.163.1]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id CAAF3A3841 for ; Tue, 26 Nov 2002 01:08:21 +0100 (CET) Received: from libertas.emma.line.org (libertas.emma.line.org [192.168.0.2]) by merlin.emma.line.org (Postfix) with ESMTP id C65F5689D1; Tue, 26 Nov 2002 01:08:16 +0100 (CET) Received: from libertas.emma.line.org (localhost [127.0.0.1]) by libertas.emma.line.org (8.12.6/8.12.6) with ESMTP id gAQ08GVR007456; Tue, 26 Nov 2002 01:08:16 +0100 (CET) (envelope-from emma@libertas.emma.line.org) Received: (from emma@localhost) by libertas.emma.line.org (8.12.6/8.12.6/Submit) id gAQ08EVh007455; Tue, 26 Nov 2002 01:08:14 +0100 (CET) Message-Id: <200211260008.gAQ08EVh007455@libertas.emma.line.org> Date: Tue, 26 Nov 2002 01:08:14 +0100 (CET) From: Matthias Andree Reply-To: Matthias Andree To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/45738: sh "unset" built-in violates IEEE Std 1003.1-2001. Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >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