From owner-freebsd-current@FreeBSD.ORG Tue Feb 10 22:55:56 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78DEF678; Tue, 10 Feb 2015 22:55:56 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4EEFE76F; Tue, 10 Feb 2015 22:55:56 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E22F65A9F27; Tue, 10 Feb 2015 22:55:55 +0000 (UTC) Date: Tue, 10 Feb 2015 22:55:55 +0000 From: Brooks Davis To: Ian Lepore Subject: Re: nagios vs w/uptime Message-ID: <20150210225555.GC75249@spindle.one-eyed-alien.net> References: <54DA617A.4090309@wemm.org> <4A76A371-B573-4E62-BE78-94944963FFD0@freebsd.org> <1423603964.80968.28.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline In-Reply-To: <1423603964.80968.28.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Marcel Moolenaar , Michael Gmelin , Peter Wemm , freebsd-current Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 22:55:56 -0000 --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 10, 2015 at 02:32:44PM -0700, Ian Lepore wrote: > On Tue, 2015-02-10 at 22:24 +0100, Michael Gmelin wrote: > >=20 > >=20 > > > On 10 Feb 2015, at 22:17, Michael Gmelin wrote: > > >=20 > > >=20 > > >=20 > > >=20 > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: > > >>=20 > > >> [Moving to current@] > > >>=20 > > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm wrote: > > >>>=20 > > >>> Surprises: > > >>> * nagios doesn't like w / uptime anymore. libxo perhaps? > > >>=20 > > >> Seems most likely, although I haven?t seen any differences in output > > >> in my (admittedly limited) testing. > > >>=20 > > >> In what way does Nagios not like w/uptime? > > >> Any concrete errors, output or misbehavior? > > >> Ideally: can you reproduce the problem? > > >=20 > > >=20 > > > Just compared 10.1 to current, unmodified output looks the same, but = pipelines don't work properly: > > >=20 > > > 10.1: > > > # uptime | wc > > > 1 12 68 > > >=20 > > > Current: > > > # uptime | wc > > > 0 0 0 > > >=20 > > > # uptime | cat > > > # uptime > > > 10:16PM up 9 mins... > > >=20 > >=20 > > Adding xo_finish() to w.c line 268 just right before exit(0); fixes tha= t issue (I don't know libxo well enough to say if this is the proper fix or= just a workaround, but it seems logical to me). > >=20 >=20 > I wonder if that implies that any non-normal exit from a program that > has been xo'd will result in the loss of output that would not have been > lost before the xo changes? That could lead to all kinds of subtle > failures of existing scripts and apps. I suspect that for most programs with more than a few exit points, adding an atexit() registration to call xo_finish() is going to be a good odea. -- Brooks --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTajHsACgkQXY6L6fI4GtTwfgCfQ800LigRpcrwaiGqXj00iOTe c6gAnj+6IS3qzFF1MtEpZSQ03C2ytu3w =6iqp -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR--