lua-users home
lua-l archive

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


   I think that you should do that in a second thread and leave the iup.MainLoop working free. This should also reduce processor usage.

 

Best,

scuri

 

From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Bob Hibberdine
Sent: quinta-feira, 5 de agosto de 2010 11:26
To: Lua list
Subject: IUP, popen & processes

 

Hi all,

 

I have an Lua / IUP script that runs other scripts which in turn run external programs. This is all running with Lua For Windows.

I use io.popen to start any external [program and wait in  a loop for an EOF from the output pipe. Within this loop I call iup.flush{} to keep the parent Windows GUI app “alive”

This all works fine for as long as there is output from the external program. If not, the read from the pipe blocks (until the program ends) and my Windows GUI freezes.

 

Is there a simple way around this without using specialist libraries etc?

Can you do non-blocking IO with standard Lua?

 

Many Thanks,

 

Bob

 

 

 

 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________