Bug 1825 - hush back-quote expansion does not set $? properly
Summary: hush back-quote expansion does not set $? properly
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.16.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-24 12:04 UTC by Ian Abbott
Modified: 2010-06-03 02:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Abbott 2010-05-24 12:04:25 UTC
In hush:

$ cmdout=`false`
$ echo $?
0

The $? variable should have been set to 1 (the exit code of the back-quoted command), not 0.
Comment 1 Ian Abbott 2010-05-24 12:08:27 UTC
Note that Busybox's 'ash' does it correctly.
Comment 2 Denys Vlasenko 2010-05-24 12:43:07 UTC
This is already fixed in git and will be working correctly in 1.17.x
Comment 3 Ian Abbott 2010-05-24 12:45:06 UTC
Thanks, Denys. I should have checked the git master branch first! Sorry for the noise.