diff options
author | Ron Yorston | 2020-02-21 16:16:56 +0000 |
---|---|---|
committer | Denys Vlasenko | 2020-02-24 12:52:41 +0100 |
commit | 6cda0b04a3d3c36312adf7a9aa608306f6a5704a (patch) | |
tree | 95f8d11e21dd7545f45cf5f269e606b37ca7a631 | |
parent | 7f198485529cf3b9cc074a944dec56769872a1e3 (diff) | |
download | busybox-6cda0b04a3d3c36312adf7a9aa608306f6a5704a.zip busybox-6cda0b04a3d3c36312adf7a9aa608306f6a5704a.tar.gz |
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 <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index bf6a86d..03864c6 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: |