Non-Blocking Application Execution

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
khamarr3524
Prole
Posts: 41
Joined: Thu Sep 05, 2013 8:48 pm

Non-Blocking Application Execution

Post by khamarr3524 »

I'm trying to get an updater finished, and I want to make it so that if the game is launched without the updater being launched, it launches the updater, checks the files, and when it finishes launches the game again with an argument telling it the updater was launched. However, using os.execute() causes the updater to block, waiting for the application to end before closing. And using love.system.openURL() fails to open files when I attempt to pass arguments. What are my other options here?

Edit: I found the solution, and in order to make it platform independent I had to use separate calls.

For windows doing os.execute("start " .. appPath) causes it to not block.
For Unix doing os.execute(appPath .. " &") causes it to not block.
Post Reply

Who is online

Users browsing this forum: No registered users and 57 guests