bug-bash
[Top][All Lists]
Advanced

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

Re: waiting for process substitutions


From: Greg Wooledge
Subject: Re: waiting for process substitutions
Date: Fri, 5 Jul 2024 15:44:52 -0400

On Fri, Jul 05, 2024 at 15:16:31 -0400, Chet Ramey wrote:
> They're similar, but they're not jobs. They run in the background, but you
> can't use the same set of job control primitives to manipulate them.
> Their scope is expected to be the lifetime of the command they're a part
> of, not run in the background until they're wanted.

Some scripts use something like this:

    #!/bin/bash
    exec > >(tee /some/logfile) 2>&1
    logpid=$!

    ...

    exec >&-
    wait "$logpid"

Your expectations might be different from those of bash's users.



reply via email to

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