News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Free up the GUI durring an os.execute
Author Message
dvw86
Junior Member
**


Posts: 39
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1
Free up the GUI durring an os.execute

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.

07-19-2008 03:48 AM
Find all posts by this user Quote this message in a reply
dvw86
Junior Member
**


Posts: 39
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #2
RE: Free up the GUI durring an os.execute

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.

07-19-2008 06:11 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #3
RE: Free up the GUI durring an os.execute

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

07-19-2008 09:25 AM
Find all posts by this user Quote this message in a reply
znarf
Junior Member
**


Posts: 34
Group: Registered
Joined: Jun 2007
Status: Offline
Reputation: 0
Post: #4
RE: Free up the GUI durring an os.execute

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.

This post was last modified: 07-20-2008 06:59 AM by znarf.

07-20-2008 06:59 AM
Find all posts by this user Quote this message in a reply
dvw86
Junior Member
**


Posts: 39
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #5
RE: Free up the GUI durring an os.execute

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

07-20-2008 04:20 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: