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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4752 invoked from network); 25 Oct 2021 16:00:47 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 16:00:47 -0000 Received: (qmail 19841 invoked by uid 89); 25 Oct 2021 16:01:12 -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 19834 invoked from network); 25 Oct 2021 16:01:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=6JDjFly/X2TGrmbmwIWinfkb7tl7uWtLNmY37woT/M8=; b=FuUxPGrbPLbEOpVujLwrtY73SHTkgwAN7/l/dkjVWZuyJVMM35PUuwJyLIP5tMB9xR 6eczLx/uAEIBm3LGQc5M/mwzGToi7pJXh0UYP5MlEOHP7wE5eyjhy5XJr4MAfsNlOWBy wTTPxSuC5fz3sQy3KbJfRtMawK8b4Ef9uiZKonKyW6xiVki+cDUIn23clJbEL5ILBZiB 5UFEG7HoBmQNXQpUPr0jzCwTST5jnNhF6eWaNNIWDf8hdmETDF3m2Q96zp+ejBctfZGh 18A7TJM3m7agjmOh4k+RdQzRUd6Fm96h+BUr0ahE79lDW7R96HToM5UEpQbRRNYgyBLZ 0qvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=6JDjFly/X2TGrmbmwIWinfkb7tl7uWtLNmY37woT/M8=; b=XJKxn8kYmVLeRS7c+bzj0mqxBXEgYon4VLUL3nN+NGP23tRl3RMTiyRU+iH+LS2xnf VFYowrMNZL9rcIW0nBir8TVc2RGmGTazb9lw3Jts29hOd3Y3WP5D/fb0qpNpN1TzRcfp SL46Yn+Ef/HI4EDVAeiZlVtZCAKm6pNK9DKpar8Mzz1BZnl1vhn2Y172bijJbYwoAIBn 9r+1rUValjWH9xWf3tppTSskfmgdo7D9OHmavsTuNHB/HBW/LFjyHk+fpQZjfMZw64SY LtP4/vzdqIHMLICdvss7AggWL75kLUDcYPKsB09CfoRua9WFLCuuuLRXRLjRfgvCPaus eRjg== X-Gm-Message-State: AOAM531lIkGrqqW6nqT8ddnLn5DkFsCv8s+wVPLNtGFq+FtXn9S4em1r uFO4QEzIoxBGfb6XXxxGfLA9p3DM3DM= X-Google-Smtp-Source: ABdhPJxiNxh0ChbXNAQA0zAuaEpvu2adEcxDGDPj2hBZUt737/dR8Tx4XI2l45aOXusiidaO8rIcmA== X-Received: by 2002:a2e:bf18:: with SMTP id c24mr19855584ljr.408.1635177644335; Mon, 25 Oct 2021 09:00:44 -0700 (PDT) From: "Casper Ti. Vector" X-Google-Original-From: "Casper Ti. Vector" Date: Tue, 26 Oct 2021 00:00:36 +0800 To: supervision@list.skarnet.org Subject: Re: A program that can get exactly the log of a supervised process? Message-ID: Mail-Followup-To: supervision@list.skarnet.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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