lua-users home
lua-l archive

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


Do you need the way to write to another process' stdout and read from that process' stdin ?

If this is the case you may need mkfifo (available in luaposix).
Here's the bash snippet to solve this issue, it can be adopted:

mkfifo /tmp/fifo
process1 < /tmp/fifo | process2 > /tmp/fifo
rm /tmp/fifo




On Mon, Dec 23, 2013 at 7:11 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
io.popen can either pipe to or pipe from a program. That's
because the C library routine can only do one of the two.

Now suppose a certain program writes unbuffered output.
Is there any way (coroutine, temporary file, whatever) to
read whatever output has just been written after providing
some input?