diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-08-10 12:40:01 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-08-10 20:59:55 +0200 |
commit | 16edced39ecf4c316179b72c01af249f85b36218 (patch) | |
tree | 6f11dee57e63318e6100e2f0b43a9c3b1b771c4b /arch | |
parent | 58713d32746d49ad39ba17658fe82f1b98b80b2e (diff) | |
download | barebox-16edced39ecf4c316179b72c01af249f85b36218.tar.gz barebox-16edced39ecf4c316179b72c01af249f85b36218.tar.xz |
hush: Make exit a shell builtin
'exit' used to do its job by returning value < 0. This is a sign
for hush that 'exit' is executed. This has problems:
- Often commands accidently return a negative value. This causes
the shell to exit.
- execute_binfmt returns a negative value when it does not find
a binary to execute. This again causes the shell to exit.
Returning a negative error value seems to be the right thing
to do, but catching this in the shell would mean that the exit
command does not work anymore.
- if called without arguments exit is supposed to return the code
of the last command. As a command exit has no access to this code.
This patch changes exit to be a builtin and also fixes the last return
code problem. While at it, update the help text.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions