← Commit list

0969a49c0

Denis Vlasenko
Denis Vlasenko
2009-04-06
FAILED Duration: 31s

Subject

hush: beautify re_execute_shell more

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+6 -6
@@ -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)