From owner-freebsd-current@FreeBSD.ORG Mon Sep 24 10:32:50 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DDE616A41B for ; Mon, 24 Sep 2007 10:32:50 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id E0AD313C469 for ; Mon, 24 Sep 2007 10:32:49 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Resent-From:Resent-Date:Resent-Message-ID:Resent-To:Date:From:To:Message-ID:MIME-Version:Content-Type:Content-Disposition:Resent-Sender:Resent-Date:X-Spam-Status:Subject; b=CZGZrTSkHHaW+9r5lQIcAMVZkQ8JaV/3pAk1JG9gcqXOWVGnB3tZz/WjBCyTDRSY/Pto1A65wCFLycG0j6FsL3Ud7VDls+8z1ROd2XwxH7CV6u9KzIdZ7mpMPHHsaBoy3kMCtMSwo6c/T4eR73/8CbPiTUweJ1co0M8cSVI8aas=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1IZlFB-000DiV-40 for freebsd-current@freebsd.org; Mon, 24 Sep 2007 14:32:49 +0400 Resent-From: rea-fbsd@codelabs.ru Resent-Date: Mon, 24 Sep 2007 14:32:44 +0400 Resent-Message-ID: <20070924103244.GF8111@void.codelabs.ru> Resent-To: freebsd-current@freebsd.org Date: Mon, 24 Sep 2007 13:38:37 +0400 From: Eygene Ryabinkin To: freebsd-current@freebsd.org Message-ID: <20070924093837.GE8111@void.codelabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Resent-Sender: rea-fbsd@codelabs.ru Resent-Date: Mon, 24 Sep 2007 14:32:49 +0400 X-Spam-Status: No, score=-1.9 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_50 Subject: [RFC] Make /bin/sh's case construct POSIX-2 conformant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2007 10:32:50 -0000 Good day. Basically all that I will say here (and more) is said in bin/116559, http://www.freebsd.org/cgi/query-pr.cgi?pr=116559 IEEE 1003.2 specifies that the return value of the 'case' construct that did not matched any patterns shall be zero. It is not the case now, as shown by the simple test: ----- #!/bin/sh false case test in Test) ;; esac && echo ok ----- Now the case that has no patterns matched does not touch the exit value at all. PR has the patch that fixes the issue. Any comments on it? Maybe someone will be so kind to test this patch on his system(s)? Mine are showing no troubles yet ;)) Thank you! -- Eygene