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 for the current FreeBSD /bin/sh. Fix: The following patch will correct and document the expected behaviour. How-To-Repeat: Run the test script that is embedded into the patch comments.
Responsible Changed From-To: freebsd-bugs->stefanf Grab.
stefanf 2007-10-04 16:14:49 UTC FreeBSD src repository Modified files: bin/sh eval.c sh.1 Added files: tools/regression/bin/sh/builtins case1.0 Log: The exit status of a case statement where none of the patterns is matched is supposed to be 0, not the status of the previous command. Reported by: Eygene Ryabinkin PR: 116559 Approved by: re (gnn) Revision Changes Path 1.54 +1 -0 src/bin/sh/eval.c 1.125 +4 -0 src/bin/sh/sh.1 1.1 +13 -0 src/tools/regression/bin/sh/builtins/case1.0 (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->patched Fixed in current.
State Changed From-To: patched->closed Also merged to RELENG_6. Thanks!