supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Peter Pentchev <roam@ringlet.net>
To: Roger Pate <rogerpate@gmail.com>
Cc: Sean MacLennan <seanm@seanm.ca>, supervision@list.skarnet.org
Subject: Re: s6 problems logging
Date: Mon, 28 Jan 2019 13:00:42 +0200	[thread overview]
Message-ID: <20190128110042.GA5121@straylight.m.ringlet.net> (raw)
In-Reply-To: <CADTH-osQKOj3=7B0uSAbkxrMEtwyQuZp-VjzNhGa9NHSbpQohg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

On Sun, Jan 27, 2019 at 02:27:10PM -0500, Roger Pate wrote:
> On Sun, Jan 27, 2019 at 1:56 PM Sean MacLennan <seanm@seanm.ca> 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.

If it is not easy to change the program itself, the stdbuf(1)
utility in recent versions of coreutils might help (of course,
if you use some kind of minimal system, it may not always be
available).

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} pp@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-28 11:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-27  3:15 Sean MacLennan
2019-01-27  5:20 ` Colin Booth
2019-01-27 16:47   ` Sean MacLennan
2019-01-27 17:56     ` Laurent Bercot
2019-01-27 18:13     ` Colin Booth
2019-01-27 18:56     ` Sean MacLennan
2019-01-27 19:27       ` Roger Pate
2019-01-28 11:00         ` Peter Pentchev [this message]
2019-02-01  9:22           ` Jonathan de Boyne Pollard
2019-01-27 19:35       ` Guillermo
2019-01-27 14:39 ` smaclennan/doorknob Jonathan de Boyne Pollard
2019-02-02 18:32   ` smaclennan/doorknob Sean MacLennan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190128110042.GA5121@straylight.m.ringlet.net \
    --to=roam@ringlet.net \
    --cc=rogerpate@gmail.com \
    --cc=seanm@seanm.ca \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).