[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Examples of concurrent coproc usage?
From: |
Zachary Santer |
Subject: |
Re: Examples of concurrent coproc usage? |
Date: |
Mon, 15 Apr 2024 23:25:26 -0400 |
On Mon, Apr 15, 2024 at 1:57 PM Carl Edquist <edquist@cs.wisc.edu> wrote:
>
> the thing discussed in my last email to the list (about
> coproc fds being set close-on-exec) makes them unusable for anything
> beyond stdin/stdout/stderr.
>
> [It might sound like an obscure use case, but once you realize what you
> can do with it, it becomes the main use case.]
>From what Chet was saying, I thought something like this would still work:
$ exec {cat}> >( cat; )
$ coproc tee { { tee /dev/fd/${cat2}; } {cat2}>&"${cat}"; }
[2] 1952
tee: /dev/fd/11: No such file or directory
Just dup another fd without using exec, and then use that. Evidently
not. Evidence for what you thought was actually going on I guess.
As much as you can just printf the same thing once for each fd, that
doesn't work super well for binary data.
I've thought about splitting and recombining pipelines like this, but
I've never had a reason to.
- Re: Examples of concurrent coproc usage?, (continued)
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/01
- Re: Examples of concurrent coproc usage?, felix, 2024/04/17
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/03
- Re: Examples of concurrent coproc usage?, Zachary Santer, 2024/04/03
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: Examples of concurrent coproc usage?,
Zachary Santer <=
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/16
- Re: Examples of concurrent coproc usage?, Andreas Schwab, 2024/04/16
- Re: Examples of concurrent coproc usage?, Zachary Santer, 2024/04/16
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/16
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/17
- Re: Examples of concurrent coproc usage?, Martin D Kealey, 2024/04/17
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/19
- Re: Examples of concurrent coproc usage?, Martin D Kealey, 2024/04/21
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/22
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/20