From: Ron Yorston Date: Fri, 21 Feb 2020 16:16:56 +0000 (+0000) Subject: ash: move TRACE statement in evalcommand() X-Git-Tag: 1_32_0~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6cda0b04a3d3c36312adf7a9aa608306f6a5704a;p=oweals%2Fbusybox.git ash: move TRACE statement in evalcommand() Following recent work on evalcommand() a TRACE statement to report the status of a forked command was left in the wrong place. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- diff --git a/shell/ash.c b/shell/ash.c index bf6a86d3d..03864c667 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -10392,7 +10392,6 @@ evalcommand(union node *cmd, int flags) jp = makejob(/*cmd,*/ 1); if (forkshell(jp, cmd, FORK_FG) != 0) { /* parent */ - TRACE(("forked child exited with %d\n", status)); break; } /* child */ @@ -10418,6 +10417,8 @@ evalcommand(union node *cmd, int flags) } /* switch */ status = waitforjob(jp); + if (jp) + TRACE(("forked child exited with %d\n", status)); FORCE_INT_ON; out: