From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25126 invoked from network); 20 Nov 2020 23:45:10 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 20 Nov 2020 23:45:10 -0000 Received: (qmail 3069 invoked by uid 89); 20 Nov 2020 23:45:34 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 3062 invoked from network); 20 Nov 2020 23:45:34 -0000 From: "Laurent Bercot" To: =?utf-8?q?Joshua=20Ismael=20Haase=20Hern=c3=a1ndez?= , supervision@list.skarnet.org Subject: Re: How can I make the stdin of a longrun process available to other processes by writing to a file? Date: Fri, 20 Nov 2020 23:45:06 +0000 Message-Id: In-Reply-To: References: Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.0.3385.0 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudeguddguddvucetufdoteggodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucggtffrrghtthgvrhhnpedvgfevffeuleegvdektdffteegvdeiieefkeetgfeuheffheelheejhfevueeijeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht >- Using a named pipe and have `skabus-dyntee` read from it (and it dies a= s >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 skabus-dyntee args... (or in execline: redirfd -r 0 named-pipe redirfd -w 42 named-pipe skabus-dyntee args... ) -- Laurent