From owner-freebsd-arch@FreeBSD.ORG Fri Aug 1 15:51:32 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 208E2D64; Fri, 1 Aug 2014 15:51:32 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0181.outbound.protection.outlook.com [207.46.163.181]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9516D21B5; Fri, 1 Aug 2014 15:51:30 +0000 (UTC) Received: from BLUPR05CA0074.namprd05.prod.outlook.com (10.141.20.44) by DM2PR05MB734.namprd05.prod.outlook.com (10.141.178.22) with Microsoft SMTP Server (TLS) id 15.0.995.14; Fri, 1 Aug 2014 15:51:28 +0000 Received: from BN1AFFO11FD026.protection.gbl (2a01:111:f400:7c10::135) by BLUPR05CA0074.outlook.office365.com (2a01:111:e400:855::44) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Fri, 1 Aug 2014 15:51:27 +0000 Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BN1AFFO11FD026.mail.protection.outlook.com (10.58.52.86) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Fri, 1 Aug 2014 15:51:27 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF02-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Fri, 1 Aug 2014 08:51:26 -0700 Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id s71FpCn97304; Fri, 1 Aug 2014 08:51:13 -0700 (PDT) (envelope-from phil@juniper.net) Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.14.4/8.14.3) with ESMTP id s71FoiQo003612; Fri, 1 Aug 2014 11:50:51 -0400 (EDT) (envelope-from phil@idle.juniper.net) Message-ID: <201408011550.s71FoiQo003612@idle.juniper.net> To: "Simon J. Gerraty" Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML In-Reply-To: <20140801050434.82C9E580A2@chaos.jnpr.net> Date: Fri, 1 Aug 2014 11:50:44 -0400 From: Phil Shafer MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(164054003)(47776003)(54356999)(81542001)(69596002)(80022001)(4396001)(83322001)(85852003)(74662001)(95666004)(103666002)(92726001)(83072002)(97736001)(31966008)(74502001)(1941001)(105596002)(6806004)(50986999)(53416004)(68736004)(85306004)(76482001)(64706001)(86362001)(102836001)(21056001)(92566001)(81156004)(84676001)(50466002)(48376002)(87936001)(99396002)(106466001)(46102001)(77982001)(107046002)(110136001)(76506005)(79102001)(81342001)(20776003)(44976005); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR05MB734; H:P-EMF02-SAC.jnpr.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 029097202E Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.16 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.16) smtp.mailfrom=phil@juniper.net; X-OriginatorOrg: juniper.net Cc: arch@freebsd.org, Poul-Henning Kamp , marcel@freebsd.org, John-Mark Gurney X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2014 15:51:32 -0000 "Simon J. Gerraty" writes: >Of course I wouldn't be surprised if the lib already handles all that ;-) No, I can't manufacture memory on the fly ;^) Hmmm... I could have an emergency mode where I stop trying to buffer and churn out a series of small write() calls to send close tags. Or perhaps just punting and refusing to write more once ENOMEM is seen is the right thing. Seeing broken output is better than limping along with output that looks right but isn't. Thanks, Phil