Murga-Projects Forums
Free up the GUI durring an os.execute - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: Free up the GUI durring an os.execute (/showthread.php?tid=332)


Free up the GUI durring an os.execute - dvw86 - 07-19-2008 03:48 AM

When I execute something with os.execute the FLTK GUI waits for the other program to finish before it will accept any more events. Is there a way around this? In bash adding the "&" at the end of a command will solve this problem.


RE: Free up the GUI durring an os.execute - dvw86 - 07-19-2008 06:11 AM

Well I answered my own question. Putting the "&" at the end of the command does the trick. I'm not sure why it wasn't working before, but now it is.


RE: Free up the GUI durring an os.execute - mikshaw - 07-19-2008 09:25 AM

also io.popen() runs a command in a separate process. Both functions have their benefits and drawbacks.


RE: Free up the GUI durring an os.execute - znarf - 07-20-2008 06:59 AM

Appending an ampersand works only for UNIX like operating systems. The recently added luasys package provides the function sys.spawn( ) which starts an asynchronous process in all operating systems including Windows.


RE: Free up the GUI durring an os.execute - dvw86 - 07-20-2008 04:20 PM

znarf Wrote:
Appending an ampersand works only for UNIX like operating systems. The recently added luasys package provides the function sys.spawn( ) which starts an asynchronous process in all operating systems including Windows.



That's good to know. I mainly program in Linux but it I'm sure it will come in handy. Thanks
Dan