How can I execute an external program and let it run in the background, rather than waiting for it to finish before the page is "done"?
SonicMailer Pro - Professional mailing list manager & award-winning email marketing software
Download a FREE 30-day trial today!
Use coupon savemoreon4 and save 10%!






andy206uk posted this at 07:28—5th April 2007.
He has: 1,742 posts
Joined: Jul 2002
I'm pretty sure the method you are talking about is called 'forking'. In unix you can usually run most commands in the background, simply execute the program using the standard unix syntax between backticks (`) with the necessary flags to run it in the background and that should work...
Actually... I've just done a bit more research. It would appear that to make a process run in the background you just put an ampersand (&) at the end of the line.
so your script could look like:
<?php`process_name &`;
?>
Andyk
Music Rants News and Reviews | My Photoblog | Blog of a Web Designer
Give a man a fish and you feed him for a day. Teach him to use the Net and he won't bother you for weeks.