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 <[email protected]>
---
 shell/ash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/shell/ash.c b/shell/ash.c
index fd2fc9f23..71f79d430 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10390,7 +10390,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 */
@@ -10416,6 +10415,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:
-- 
2.24.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to