From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2468 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Roger Pate Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6 problems logging Date: Sun, 27 Jan 2019 14:27:10 -0500 Message-ID: References: <20190126221517.70ea00b8@zonker.seanm.ca> <20190127052000.4skktmkfzmit6ykl@cathexis.xen.prgmr.com> <20190127114751.169d2a15@zonker.seanm.ca> <20190127135646.66682ee5@zonker.seanm.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="77386"; mail-complaints-to="usenet@blaine.gmane.org" Cc: supervision@list.skarnet.org To: Sean MacLennan Original-X-From: supervision-return-2058-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Jan 27 20:27:48 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1gnq5r-000K4m-UA for gcsg-supervision@m.gmane.org; Sun, 27 Jan 2019 20:27:48 +0100 Original-Received: (qmail 10135 invoked by uid 89); 27 Jan 2019 19:28:13 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 10128 invoked from network); 27 Jan 2019 19:28:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tF55VwidsOE907mEePt6MSxUp9CtPb2kdIsJvHGl8jI=; b=ArPqdyZzZqqNb0Bv8sAhUepc8qVi/Ksa87bsg/Ywblb31ggG7OxKmjcMt0sfp0fYRJ YTCcyOcCZeXkr7gPgJkLZi9/BGYg1STDCYQLtGQJxGX8U3modSaVN9Pw4qhTjZz2YU90 nbUnR3PL4gE/8q+lQACGP1T0KPRvS8hhuh7d21lDLmrZydd3rxYNF148UmmIITNv4Srt 08YIGS9fTKIXh9B+WrFvHjFmIqf0kKf/xnc4OBjcXgydC6aYBSbsNJ+Rsqa6Or3fGVo3 k1DR9cOGAp3vAQRcUstMMDkTBLHVYwcfoz09Zwrqyco0I27EhklzdPDJhlhgeGScfXhn kvyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tF55VwidsOE907mEePt6MSxUp9CtPb2kdIsJvHGl8jI=; b=bTDutuYpv/Dtmu2XK2aOprVIAMtXCDqf5E2aBdL0obFWG0TXp6HEL3ox6YA0zOuckH pflvayV+ph5FKBYXwmxHSax4iLHP0YsG5WtcWqgqszBPySsftymv28MIvwBpVvm6opi+ OeFg9v7xU/3LoFJjJBCNUCpjav7hjLwHcfW7pG4oNg2z5+MmhrVu5nBRUxfOVwiMXVVb ZGx6ivUhJmDuA5VKG58LkJ9GOnXRzZVwJws4Bt6e0l43tJIBtCUl+1DY4Wc+N9gY3yGt OJETmw26BWd6WDLrxD+py95ijrksfb1P7jkRbei41awO/Y1P/y1+2j+z1pFGXZe8KJ4x BNcw== X-Gm-Message-State: AJcUukc3kP2n90UTa9C6eewck1C7ciePpFYkouryR1ZHWCZ+9HJiUEGz 1dmoTnGcZR2fZLcW2+1geN51EnuMihyAdJKNO4nkH8B0 X-Google-Smtp-Source: ALg8bN5ShS/2myYmi4ZoGMhTFn5EjX65R64HFw2fOPyZguV/RDdEeRhhqksLfNUmrp1MT8WvxQD2ioI7MM4T7hFgAcU= X-Received: by 2002:a1c:8c05:: with SMTP id o5mr13769542wmd.29.1548617266524; Sun, 27 Jan 2019 11:27:46 -0800 (PST) In-Reply-To: <20190127135646.66682ee5@zonker.seanm.ca> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2468 Archived-At: On Sun, Jan 27, 2019 at 1:56 PM Sean MacLennan wrote: > So it seems that s6-log does not like buffered output. I modified > doorknob to vsnprintf into a buffer and then tried various output > methods. s6-log (or another program) has no idea about your buffered output. Output cannot be read until it has been written, and data still in a buffer has not been written. Change your program to flush after messages. It is common for stdio to buffer stdout differently depending on whether it is a terminal and to not make that distinction for stderr. In your terminal, compare "doorknob -fs" (stdout as terminal) to "doorknob -fs | cat" (stdout as pipe) to see the difference. PS. You have "dump" twice where I think you mean "dumb", in your Github description and in your README.