Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2007 10:17:10 -0400
From:      Derek Tattersall <dlt@mebtel.net>
To:        Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Cc:        current@FreeBSD.org
Subject:   Re: [RFC] Make /bin/sh's case construct POSIX-2 conformant
Message-ID:  <20070924141710.GA80377@lorne.arm.org>
In-Reply-To: <20070924093837.GE8111@void.codelabs.ru>
References:  <20070924093837.GE8111@void.codelabs.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
* Eygene Ryabinkin <rea-fbsd@codelabs.ru> [070924 08:57]:
> 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
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
On my amd64 -CURRENT system, cvsuped yesterday, the patch applies
cleanly, the build of sh proceeded without error and the test worked
perfectly.  Thanks very much for the improvement!

-- 
Best regards,
Derek Tattersall
dlt@mebtel.net		dlt666@yahoo.com		 dtatters@gmail.com



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