[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait inside subshell waits for sibling
From: |
Oğuz |
Subject: |
Re: wait inside subshell waits for sibling |
Date: |
Mon, 24 Oct 2022 05:43:32 +0300 |
24 Ekim 2022 Pazartesi tarihinde Emanuele Torre <torreemanuele6@gmail.com>
yazdı:
>
> To inhibit this optimisation, you can wrap your subshell compound
> command (or simple command) in a group command, and apply the
> redirections to it instead of the subshell command:
>
> { (: & wait) ;} > >(cat)
>
> Or, in your specific case, use "$!" to only wait for the most recent
> background job.
>
> (: & wait -- "$!") > >(cat)
>
Thanks, I'm not looking for a workaround.
--
Oğuz