[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Non-blocking read from sub-process?
- From: Dan Christian <danchristian65@...>
- Date: Tue, 5 Apr 2016 17:32:58 -0700
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).
f = io.popen(unknown_command, "r")
data = f:read()
print ("Subproc says: ", data)