aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-22 06:32:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-22 06:32:11 +0200
commit5ae8f1cdbecd3bdf502992c21a77aae65299c410 (patch)
tree68317741167295399d83246f765221532f5b9832 /shell/hush.c
parente85248afa23434b78e48fe09b57eea5f6657410d (diff)
downloadbusybox-w32-5ae8f1cdbecd3bdf502992c21a77aae65299c410.tar.gz
busybox-w32-5ae8f1cdbecd3bdf502992c21a77aae65299c410.tar.bz2
busybox-w32-5ae8f1cdbecd3bdf502992c21a77aae65299c410.zip
hush: fix hush -c 'echo $0' - was showing empty string
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 08e63785d..8125a63f1 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -7093,6 +7093,7 @@ int hush_main(int argc, char **argv)
7093 /* -c 'script' (no params): prevent empty $0 */ 7093 /* -c 'script' (no params): prevent empty $0 */
7094 G.global_argv--; /* points to argv[i] of 'script' */ 7094 G.global_argv--; /* points to argv[i] of 'script' */
7095 G.global_argv[0] = argv[0]; 7095 G.global_argv[0] = argv[0];
7096 G.global_argc++;
7096 } /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */ 7097 } /* else -c 'script' ARG0 [ARG1...]: $0 is ARG0 */
7097 init_sigmasks(); 7098 init_sigmasks();
7098 parse_and_run_string(optarg); 7099 parse_and_run_string(optarg);