I'm running a sh script that runs a java process through php on ubuntu server. I'm using proc_open for running the process. usually the Workflow goes like :
- request a page ->
- script runs (until it's finished) ->
- result page.
In my case the script runs in parallel so the server won't wait until the script is finished (it takes hours sometimes so it can't) , so I need to save that resource somehow to follow it later (status of the process or just stopping it).
The resource type is "process", I used this function get_resource_type for getting it.
Serialize won't work at this case - resource is an exceptional for it (you can look at http://il2.php.net/manual/en/function.serialize.php inside the Parameters box).
My target is a good process handling. does someone know how can i use the resource or other way you would do for process handling.