bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nofork command substitution bugs


From: Oğuz
Subject: Re: nofork command substitution bugs
Date: Fri, 12 Jan 2024 21:06:55 +0300

On Fri, Jan 12, 2024 at 7:05 PM Chet Ramey <chet.ramey@case.edu> wrote:
> Nofork command substitution freezes the jobs list, because you don't
> want jobs appearing and disappearing in the list while you're running
> word expansion. If the jobs list is frozen, wait -n doesn't even try
> waiting, since you don't want jobs removed from the list in, say, a
> SIGCHLD trap. I think it's ok to do the wait but not delete the job,
> regardless of what posix says, so I'll make that change for funsubs.

Sounds good, thanks.

> Why would that be unexpected, since you're explicitly running something
> in the calling shell's context, with the expected side effects to that
> environment?

I wasn't clear. This doesn't exit the shell

    bash-5.3$ exec foo
    bash: exec: foo: not found
    bash-5.3$

This does:

    bash-5.3$ : ${ exec foo;}
    bash: exec: foo: not found
    $

Why would you expect either to cause an interactive shell to exit?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]