[PATCH] ash: move TRACE statement in evalcommand()

Denys Vlasenko vda.linux at googlemail.com
Mon Feb 24 11:53:08 UTC 2020


Applied, thanks!

On Fri, Feb 21, 2020 at 5:17 PM Ron Yorston <rmy at pobox.com> wrote:
>
> 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 at pobox.com>
> ---
>  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
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list