lua-users home
lua-l archive

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


Hi,

William Trenker wrote:
> Thanks, Mike, for the patch.   Do you have any insight on the "best"
> way to do pipes in Lua 5.1?  Since it is not going to be included in
> the standard libraries (at least that's what the mailing list says),
> do you know of an addon library that supports pipes?

Your best bet right now is to patch the 5.1 source and add
io.popen() back in. Should be straightforward, just follow
the lines of my 5.0 patch.

But since lhf suggested the removal from the standard library,
there is some hope that he adds it to his POSIX library. ;-)

lhf's posting on this subject:
  http://lua-users.org/lists/lua-l/2004-08/msg00006.html

Unfortunately this requires a large amount of code duplication
from liolib.c. The methods are not inheritable because of the
strict metatable checks (and you really need to override close()).

[One solution: check for a class tag in the userdata environment.]

Read more in this thread:
  http://lua-users.org/lists/lua-l/2004-09/threads.html#00078

Bye,
     Mike