Re: A program that can get exactly the log of a supervised process?

From: Casper Ti. Vector <caspervector_at_gmail.com>
Date: Tue, 26 Oct 2021 00:00:36 +0800

On Mon, Oct 25, 2021 at 12:37:41PM +0000, Laurent Bercot wrote:
> Another question is how to piggyback loggrep into the notification
> mechanism: if loggrep is tied to the logger and not to the service,
> it doesn't have native access to the notification pipe. That means a
> specific mechanism is needed to give it cross-service access.

As has been sketched in previous mails, make loggrep a double-forking
chainloader, where the grandparent blocks (before closing the
notification fd and then chaining) until the grandchild is ready to
accept logs (after connecting to the logger and spawning the "grep";
the latter perhaps being an awk script in most cases)?

> But it's probably the least bad way to do it, [...]

I fullly agree. This is the crux of the problem.

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2022.09.20)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
Received on Mon Oct 25 2021 - 18:00:36 CEST

This archive was generated by hypermail 2.4.0 : Mon Oct 25 2021 - 18:01:14 CEST