Anonymous | Login | 2025-01-16 19:52 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0001235 | [1003.1(2016/18)/Issue7+TC2] Shell and Utilities | Objection | Enhancement Request | 2019-03-09 00:46 | 2024-06-11 09:08 | ||
Reporter | stephane | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stephane Chazelas | ||||||
Organization | |||||||
User Reference | |||||||
Section | 2.9.4.3 Case Conditional Construct | ||||||
Page Number | |||||||
Line Number | |||||||
Interp Status | --- | ||||||
Final Accepted Text | Note: 0004434 | ||||||
Summary | 0001235: explicitly prohibit strcmp fallback in case statement | ||||||
Description |
(another follow up to bug:1190) In the Bourne shell, ksh88 and ksh93: case [ab] in [ab]) echo match esac outputs "match" which is quite surprising and dangerous as it could bypass input validations like: case $1 in [0123456789]) : OK;; *) echo >&2 not a decimal digit; exit 1;; esac Possibly the rationale was to align with another (mis)feature introduced by the Bourne shell, where: rm [ab] would remove the [ab] file if no file matched the pattern (instead of cancelling the command in earlier sh implementations (and csh, tcsh, fish zsh)). POSIX currently doesn't allow that ksh88/ksh93 behaviour. But since it is a deviation from the reference implementation and since most certified systems whose shell is based on AT&T ksh still have that non-conformance, it would be nice to make it explicit that that behaviour is not allowed. |
||||||
Desired Action |
Add a conformance test case that rejects that behaviour. Add a rationale section stating something like: The Bourne and Korn shells used to revert to a byte to byte comparison when wildcard patterns didn't match in a "case" statement, that behaviour was considered undesirable and is not allowed by this specification. |
||||||
Tags | tc3-2008 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2019-03-09 00:46 | stephane | New Issue | |
2019-03-09 00:46 | stephane | Name | => Stephane Chazelas |
2019-03-09 00:46 | stephane | Section | => 2.9.4.3 Case Conditional Construct |
2019-03-11 02:17 | kre | Note Added: 0004294 | |
2019-03-11 07:05 | stephane | Note Added: 0004299 | |
2019-03-11 15:53 | eblake | Interp Status | => --- |
2019-03-11 15:53 | eblake | Summary | explicitely prohibit strcmp fallback in case statement => explicitly prohibit strcmp fallback in case statement |
2019-06-20 10:54 | geoffclare | Note Added: 0004434 | |
2019-06-20 15:28 | geoffclare | Final Accepted Text | => Note: 0004434 |
2019-06-20 15:28 | geoffclare | Status | New => Resolved |
2019-06-20 15:28 | geoffclare | Resolution | Open => Accepted As Marked |
2019-06-20 15:28 | geoffclare | Tag Attached: tc3-2008 | |
2019-11-14 14:31 | geoffclare | Status | Resolved => Applied |
2024-06-11 09:08 | agadmin | Status | Applied => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |