Re: [PHP] Set process custom identifier

2013-04-02 Thread Sorin Badea
I'm not storing the hashes, just generate them when starting the thread. I think that storing the thread pid in a local file (pids/threadx.pid) is the only way but I don't think is the best. Thanks anyway Stuard! On Tue, Apr 2, 2013 at 5:18 PM, Stuart Dallas wrote: > On 2 Apr 2013, at 15:11, So

Re: [PHP] Set process custom identifier

2013-04-02 Thread Stuart Dallas
On 2 Apr 2013, at 15:11, Sorin Badea wrote: > I'm trying to implement a standalone threading component, and in current > implementation I'm using `popen` to run a separate process with some > arguments that I'm using to identify them (for example `php > some_dummy_file.php -thread_id=`). This

Re: [PHP] Set process custom identifier

2013-04-02 Thread Sorin Badea
I'm trying to implement a standalone threading component, and in current implementation I'm using `popen` to run a separate process with some arguments that I'm using to identify them (for example `php some_dummy_file.php -thread_id=`). This way when I'm trying to see which are my threads I don't h

Re: [PHP] Set process custom identifier

2013-04-02 Thread Stuart Dallas
On 2 Apr 2013, at 14:50, Sorin Badea wrote: > I don't want to wait for it and surely I don't want to safe that pid in > same place. I just want to use `ps` with a pattern to return my forked > process. Storing the PID of a process you need to monitor is the established method, and is certainly

Re: [PHP] Set process custom identifier

2013-04-02 Thread Sorin Badea
I don't want to wait for it and surely I don't want to safe that pid in same place. I just want to use `ps` with a pattern to return my forked process. On Tue, Apr 2, 2013 at 4:48 PM, Matijn Woudt wrote: > Hi, > > pcntl_fork will return the pid of the fork, what is wrong with using that > pid t

Re: [PHP] Set process custom identifier

2013-04-02 Thread Matijn Woudt
Hi, pcntl_fork will return the pid of the fork, what is wrong with using that pid to identify the process? - Matijn On Tue, Apr 2, 2013 at 3:38 PM, Sorin Badea wrote: > Hi guys, > I'm trying to find a solution to identify a php process that is spawned > with pnctl_fork. I've tried to set a cu