[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cannot redirect stderr
- From: "Matthew P. Del Buono" <delbu9c1@...>
- Date: Sat, 14 Nov 2009 12:33:55 -0500
Pierre LeMoine wrote:
>> Firstly, Lua is not an acronym :) Secondly, does Windows have a call
>> similar to UNIX's dup2? This lets you duplicate a file handle to a
>> specific one (ie, so you can easily set what handles 1, 2 and 3
>> (stdout, in and err) go to.
> This page says it does. Haven't tested it.
While that function exists, typically the mechanism through which to
redirect stderr/stdout/stdin is through CreateProcess and CreatePipe:
I know it's a lot more work; it's just how it's done.
If it's not a child process, you have a much simpler function:
Matthew P. Del Buono