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.