[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cannot redirect stderr
- From: Thomas Lauer <thomas.lauer@...>
- Date: Fri, 13 Nov 2009 14:01:42 +0000
Sergio Fadda <email@example.com> wrote:
> I'm writing a standalone application (Win32... windowed) which integrates
> the LUA interpreter; the application uses LUA to export some features and I
> want to show console output in a separated window.
I once wrote a plugin for the JPSoft command processor where I ran into
this problem. See the following threads:
I learned that redirecting I/O in a clean and foolproof manner is
non-trivial. The solution I found for the plugin seems to work but it's
at best a kludge.
So if you want to show output in a *real* console window only (and not
redirect to a file), your best bet is probably to write a small wrapper
for the Win32 console IO functions and to redirect the print/error etc
functions such that they use this wrapper.