From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2472 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Peter Pentchev Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6 problems logging Date: Mon, 28 Jan 2019 13:00:42 +0200 Message-ID: <20190128110042.GA5121@straylight.m.ringlet.net> 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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="240553"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Sean MacLennan , supervision@list.skarnet.org To: Roger Pate Original-X-From: supervision-return-2062-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Jan 28 12:00:46 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 1go4ej-0010Hy-KK for gcsg-supervision@m.gmane.org; Mon, 28 Jan 2019 12:00:45 +0100 Original-Received: (qmail 25342 invoked by uid 89); 28 Jan 2019 11:01:11 -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 25335 invoked from network); 28 Jan 2019 11:01:11 -0000 Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2472 Archived-At: --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 27, 2019 at 02:27:10PM -0500, Roger Pate wrote: > 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. >=20 > 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 --=20 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 --SUOF0GtieIMvvwua Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAlxO4NUACgkQZR7vsCUn 3xM05hAArJ7qf2QIprLnHjXCUa8FedVv7LoI5/LfaqbPP8lGZhZT7kZY15pU2DaQ 2h7isUuYIGDc87bk/WiTWLTOUKjXYMxz11OjOPtDwkH5fMkt2/9AQghm7qeLyWLn 2IkC//jYOzsD9gjNVR/s2xpWySMH8n4F+S11NW5pR8HG6XXhZgOP9E34/9PFr2He J7KnoOc5BrSQ2qK0U7OMuz9RK0SgM7uWDU1SUpXZyt32qRSZAMJApoG/IS8C/cPz /KAiDi5/Ba6xJ6xreFO0nsRtqnUKzTdRI6ep8AuMEMy5Q0Uo5eklHQp/tsmzA1kq /BDz4OmBNEtrD58xLO9nteBOJio/G0rzMR8Ws2N/gO/GLRdxrs6oMTRDob8q5YMp msP+IMt9CbQ+DAhUiBILDQUWWddymIxIiP5RwWW4QXCCFalJf1QrDEnPLMpuDqIt ritDzzcvV4Hvb+92iERd/ZI96us3ncvxLHkK6tvyoQTxkQRFoCUJlPIPhWkwKcxA e8kgV45u0LjHHyYaFFM6rLBZJlnlRiNwvPnz4fomWQ0zL/kI3Hk70RTQJB+/brO5 jt1lIiNHo51w37VM7jy6FlYmOnPM3+hSU3p/sOEOMAj8W5DbkOcEibV21v4wbLi0 9xp0GYx0J0oyWwqhvT+NE+lCH+Ob2nTDtqK7EUqvHnHMx0sy2rE= =zhYc -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--