Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] using sysread/syswrite with coprocess



On Thu, May 9, 2024 at 6:09 AM Anthony Heading <ajrh@xxxxxxxx> wrote:
>
> Does the patch below make sense?  I couldn't see a way to do this otherwise

There's nothing technically wrong with the patch, but you can do
  coproc ...
  exec {coprocin}>&p
  exec {coprocout}<&p
and then
  syswrite -o $coprocin ...
or
  sysread -i $coprocout ...

Whether it makes sense to support direct access to the coproc FD by
either "-o p" / "-i p" or simply -p as with print / read, or neither,
I will leave for larger discussion.




Messages sorted by: Reverse Date, Date, Thread, Author