lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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