php - exec: it's not forking
Hi!
I'm creating a simple library to handle asynchronous tasks. I have created a shell wrapper around the task handler (another shell script) that wimply calls the real handler with a & at the end so that the handler can start and the wrapper can exit (I can follow the progress with some temp files use by the task handler). That's exactly what happens when I call the wrapper directly from CLI. It starts and exists right away wile the task starts and moves forward. Now, when I call the wrapper with exec on php it doesn't go on (so that the php script can move on while the async task does its job) but gets stuck instead till the task is finished.
Why is that? And what is the workaround? Thanks in advance.
|