projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e85248a
)
hush: fix hush -c 'echo $0' - was showing empty string
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 22 May 2010 04:32:11 +0000
(06:32 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 22 May 2010 04:32:11 +0000
(06:32 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index 08e63785ddf2e0d18fafb6996e004f86cc76abb7..8125a63f1fc1fd1c66d29cbd8d771d62edc71aeb 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-7093,6
+7093,7
@@
int hush_main(int argc, char **argv)
/* -c 'script' (no params): prevent empty $0 */
G.global_argv--; /* points to argv[i] of 'script' */
G.global_argv[0] = argv[0];
+ G.global_argc++;
} /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */
init_sigmasks();
parse_and_run_string(optarg);