On Tue, Mar 21, 2023 at 3:28 PM Chet Ramey <chet.ra...@case.edu> wrote:
>
> > Interestingly, if an external command or a subshell is executed after
> > the process substitution is started but prior to receipt of the
> > signal, the `wait' works fine:
> >
> > $ (trap 'wait $!; echo $?' EXIT; : <(:); (:); kill 0)
>
> Because the procsub gets reaped before the terminating signal arrives.

Oh I see, thanks.

So to wait for a procsub after receiving a terminating signal, one
must do so in a trap for the signal itself and not in an EXIT trap.

Reply via email to