[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Non-blocking read from sub-process?
- From: Dan Christian <danchristian65@...>
- Date: Wed, 6 Apr 2016 09:42:18 -0700
Thank you. That was exactly what I needed!
I did re-write the first function to not depend on your stuff (in case
anyone else wants it).
local posix = require('posix')
local data = string.rep("a",72) .. "\n"
for i = 1 , 5 do
local my_time = posix.time()
io.stdout:write(my_time .. data)
posix.sleep(1) -- delay 1 second
On Tue, Apr 5, 2016 at 7:31 PM, Sean Conner <firstname.lastname@example.org> wrote:
> It was thus said that the Great Dan Christian once stated:
>> I want to run a sub-process that may or may-not generate output. How
>> can I make sure I don't block trying to read it. I'm happy to use
>> luaposix, but I'm trying not to use a big event framework like lua-ev
>> (because I'm memory limited and also don't want to cross compile it).