XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Aug 1 20:28:17 UTC 2014
--------
In message <201408011550.s71FoiQo003612 at idle.juniper.net>, Phil Shafer writes:
>"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.
First of, this is not just ENOMEM, this is also invalid UTF-8 strings,
NULL pointers and much more bogosity.
>Seeing broken output is better than limping
>along with output that looks right but isn't.
The output should preferably be explicitly broken, so that nobody
downstream mistakenly takes it and runs with it.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list