Re: How can I make the stdin of a longrun process available to other processes by writing to a file?

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Fri, 20 Nov 2020 23:45:06 +0000

>- Using a named pipe and have `skabus-dyntee` read from it (and it dies as
>soon as the writer program ends).

  Yes, that's normal. If you want to avoid this, you need to keep the
named pipe open, and that can be done via having another process opening
the named pipe for writing, and not dying. That process can even be the
reader itself, see below.


>- Configuring up s6-fdholder for my user to use (but it seems I don't
>understand how to give it the stdin to read).

  You don't need a fdholder just for this: you already have a living
process that can maintain the named pipe - skabus-dyntee itself.
Try the following:

exec <named-pipe
exec 42>named-pipe
exec skabus-dyntee args...

(or in execline:
  redirfd -r 0 named-pipe
  redirfd -w 42 named-pipe
  skabus-dyntee args...
)

--
  Laurent
Received on Fri Nov 20 2020 - 23:45:06 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC