lua-users home
lua-l archive

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


At Wed, 4 Apr 2007 15:51:06 -0700,
Mark Edgar wrote:
>
> I'll insert my obligatory plug for the "ex" API:
> http://lua-users.org/wiki/ExtensionProposal
>
> -- if you just want the exit code:
> local exitcode = assert( os.spawn"my_command" ):wait()
>
> -- if you want the output too:
> local i,o = io.pipe()
> local proc = assert(os.spawn{"my_command", stdout=o})
> o:close()
> local output = i:read"*a"
> local exitcode = proc:wait()
> i:close()
>

Where does io.pipe() come from? I could not find it in the Lua
reference.

He linked it in his original post, the "ex" API.

http://lua-users.org/wiki/ExtensionProposal