Murga-Projects Forums

Full Version: Free up the GUI durring an os.execute
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
also io.popen() runs a command in a separate process. Both functions have their benefits and drawbacks.
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.

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

Reference URL's