I'm making a simple call to restore a mysql backup that takes about 45 minutes to complete on one of my servers.
system("mysql -u$user -p$pass $db < '$file' &");
Running it that way locks my browser and I have to wait until it's finished before I can do anything. This works fine on my other server. What settings could be preventing that from working on the first server?
You still have the "handle" to the output pipes (stdout && stderr) which prevents backgrounding fully.
append a > /dev/null 2>&1
to the end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With