On 02/22/2012 01:52 AM, Chet Ramey wrote:
> On 2/21/12 3:51 AM, John Kearney wrote:
> 
>> Bash Version: 4.2 Patch Level: 10 Release Status: release
>> 
>> Description: Basically if setting the locale fails variable
>> should not be changed.
> 
> I disagree.  The assignment was performed correctly and as the
> user specified.  The fact that a side effect of the assignment
> failed should not mean that the assignment should be undone.
> 
> I got enough bug reports when I added the warning.  I'd get at
> least as many if I undid a perfectly good assignment statement.
> 
> I could see setting $? to a non-zero value if the setlocale() call
> fails, but not when the shell is in posix mode.
> 
> Chet
> 
ok I guess that makes sense, just ksh93 behavior also makes sense, I
guess I can just use some command to check the charset is present
before I assign it.

Reply via email to