diff options
author | Denis Vlasenko | 2009-04-06 13:05:57 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-06 13:05:57 +0000 |
commit | 0969a49c081aee3c53241e2f53ebc89d14070a39 (patch) | |
tree | a7832f70acf10b5c60bd63d24189b636f41b16ae /shell | |
parent | 34e573d2cee139f1b694737a66be394e0676d0d4 (diff) | |
download | busybox-0969a49c081aee3c53241e2f53ebc89d14070a39.zip busybox-0969a49c081aee3c53241e2f53ebc89d14070a39.tar.gz |
hush: beautify re_execute_shell more
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/hush.c b/shell/hush.c index dfbd457..3eb03e5 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2311,6 +2311,12 @@ static void re_execute_shell(const char *s) char **argv, **pp, **pp2; unsigned cnt; + sprintf(param_buf, "-$%x:%x:%x" USE_HUSH_LOOPS(":%x") + , (unsigned) G.root_pid + , (unsigned) G.last_bg_pid + , (unsigned) G.last_return_code + USE_HUSH_LOOPS(, G.depth_of_loop) + ); /* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> * 3:-c 4:<cmd> <argN...> 5:NULL */ @@ -2321,12 +2327,6 @@ static void re_execute_shell(const char *s) } G.argv_from_re_execing = pp = xzalloc(sizeof(argv[0]) * cnt); *pp++ = (char *) G.argv0_for_re_execing; - sprintf(param_buf, "-$%x:%x:%x" USE_HUSH_LOOPS(":%x") - , (unsigned) G.root_pid - , (unsigned) G.last_bg_pid - , (unsigned) G.last_return_code - USE_HUSH_LOOPS(, G.depth_of_loop) - ); *pp++ = param_buf; for (cur = G.top_var; cur; cur = cur->next) { if (cur->varstr == hush_version_str) |