[nycphp-talk] IPC Problems
Ben Sgro (ProjectSkyline)
ben at projectskyline.com
Thu Apr 19 15:26:18 EDT 2007
I've tried to accomplish with two scripts.
Execept I didn't think ahead of enough and now
I'm having the problem of calling exec( )
and the parent script waiting until it returns.
I can't seem to call exec(script &) <-- & to force to background
but the parent still waits...
Any way to get around this?
- Ben
..............FROM PARENT.................
/* Run the child_job to execute this job_id. */
exec("env -i /usr/bin/php child_job.php -i $jobIdToRun");
/* IT WAITS HERE UNTIL child_job.php IS DONE RUNNING */
/* Child needs to report back its PID. */
msg_receive($MSG_QUEUE, 1, $real_type, 16384, $childPID, 1, 0, $err);
error_log("childPID($childPID)");
More information about the talk
mailing list