I am writing a simple PHP application that sometimes has to do a fairly intense set of MySQL updates. I donβt really want this to cause a delay for the user, so I'm curious about using pcntl_fork ().
I'm not sure how this works: will the child process continue after the parent process completes? Will the parent process end and the user page will be fully loaded before the child process is complete?
In other words, is this a safe way to get a PHP script (running under Apache) to perform some time-consuming updates without delaying the user, or just asking my users to put up with the delay?
php process fork
Ben
source share