[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bidirectional io.open()...anyone got one?
- From: Rici Lake <lua@...>
- Date: Thu, 5 Jul 2007 18:10:49 -0500
On 5-Jul-07, at 5:49 PM, Duck wrote:
I suspect that this is a perennial question (judging by a quick look
at some list postings of the past)...
...but does anyone have either a patch or a package which implements a
bidirectional popen()? One which allows not just "r" xor "w" like the
standard version, but also "rw" so that I can use the file handle it
returns to push data into and get data out of the stdin/stdout of the
The mode for read-write is "r+", not "rw". That will work fine on BSDs,
but Linux doesn't support bidirectional popen as far as I know.
Oh, and which is portable between at least Linux and Windows, if not
also OS X and the BSDs?
Try Mark Edgar's implementation of spawn, available soon on LuaForge,
with a preliminary version available here: