[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Joining stdout and stderr
- From: David Given <dg@...>
- Date: Tue, 20 Dec 2005 16:59:22 +0000
On Tuesday 20 December 2005 15:55, Eduardo Ochs wrote:
> error("Bla!")
Ah --- didn't realise you were using error(). The default implementation
which, if I've managed to find it correctly is in lua.c, explicitly writes to
stderr. It doesn't go through the Lua I/O layer.
I'd say you probably have three choices:
(a) do something OS specific which I don't know about.
(b) patch lua.c to write to stdout instead of stderr.
(c) change your script to execute all code inside a pcall wrapper, so that you
can provide your own error reporter that writes to stdout.
Assuming Windows is reasonably Posix, it *may* be possible to simply tell it
to line buffer stdout and stderr --- this will normally do what you want.
setlinebuf() should do this. I don't know if this works on Windows, though.
--
+- David Given --McQ-+ "In America, family has become a code word for
| dg@cowlark.com | something that you can put a five-year-old in front
| (dg@tao-group.com) | of and come back secure in the knowledge that your
+- www.cowlark.com --+ child not will not have been exposed to any ideas."
Attachment:
pgpC86JcUt4Lp.pgp
Description: PGP signature