lua-users home
lua-l archive

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

Already doing this..

local USE_POPEN= pcall( io.popen, "echo" )   -- true/false


Tuomo Valkonen kirjoittaa maanantaina, 8. maaliskuuta 2004, kello 12:46:

On Mon, Mar 08, 2004 at 11:01:46AM +0100, Enrico Colombini wrote:
Unfortunately it's not available on all systems.

Yes, but perhaps, as popen only supports read or write, not both, it
could be implemented similarly to what Arto described on systems that
do not support proper pipes? Maybe with a flag that would cause popen
to fail if real pipes are not available?