The GNU Bourne-Again SHell - Patches: patch #7638, exit-code triggered error behavior...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7638: exit-code triggered error behavior changed in 4.1: incompat w/earlier versions of POSIX
Submitter: | Linda A. Walsh <law> | ||
Submitted: | Fri 21 Oct 2011 08:41:05 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Sun 23 Oct 2011 08:50:10 PM UTC, comment #3: |
Linda A. Walsh <law> |
Sun 23 Oct 2011 08:45:53 PM UTC, comment #2: Actually, it's changed not from the earliest, but from the 2004 specification.
|
Linda A. Walsh <law> |
Sun 23 Oct 2011 01:12:49 AM UTC, comment #1:
You really don't know the history of the Posix compatible shell? No wonder you are letting multiple compat problems creep through at the POSIX standard committee and in the newer versions of Bash. ;-/ |
Linda A. Walsh <law> |
Fri 21 Oct 2011 08:41:05 PM UTC, original submission:
The new version of bash in non-posix mode (this is likely changed in POSIX mode as well, but in non-posix mode it didn't need to be, pointlessly, made incompatible) has broken compatibility with the early POSIX specs in following the newer 'portable OS *[non]* interoperability Xchange' specification'.
|
Linda A. Walsh <law> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-05-04 | chet | Status | None | Wont Do |
Powered by Savane 3.13-d3ae.
Corresponding source code
Here's a better definition of 'simple command'.
2.9.1 Simple Commands
A "simple command" is a sequence of optional variable assignments and redirections, in any sequence, optionally followed by words and redirections, terminated by a control operator.
When a given simple command is required to be executed (that is, when any conditional construct such as an AND-OR list or a case statement has not bypassed the simple command), the following expansions, assignments, and redirections shall all be performed from the beginning of the command text to the end:
1.
The words that are recognized as variable assignments or redirections according to Shell Grammar Rules are saved for processing in steps 3 and 4.
2.
The words that are not variable assignments or redirections shall be expanded. If any fields remain following their expansion, the first field shall be considered the command name and remaining fields are the arguments for the command.
3.
Redirections shall be performed as described in Redirection.
4.
Each variable assignment shall be expanded for tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal prior to assigning the value.
In the preceding list, the order of steps 3 and 4 may be reversed for the processing of special built-in utilities; see Special Built-In Utilities.
****
If no command name results, variable assignments shall affect the current execution environment.
****
Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment (except for special built-ins). If any of the variable assignments attempt to assign a value to a read-only variable, a variable assignment error shall occur. See Consequences of Shell Errors for the consequences of these errors.
The only case in which a variable assignment should result in an error or err-exit is assignment to a read-only variable.