Re: Re: pcntl_fork doesn't work

From: Date: Wed, 26 Jan 2005 19:10:28 +0000
Subject: Re: Re: pcntl_fork doesn't work
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-207404@lists.php.net to get a copy of this message
> > I could run a background job which periodically does the gethostbyaddr > > on the IP's stored on disk, but that's sort of a hack, and is more > > complicated than if I could fork. > Sounds like passthru() might do what you want > <http://us3.php.net/passthru>. Actually forking to resolve ip based on a xxxxx amount of users is a very bad idea.... you could end up with having 1000's of programs looking up an IP address. Remember that you are spawning a "new program" not a thread. Therefore you are looking at some serious performance and load issues as spawning a new program is not anywhere near efficient as threading. This is very bad idea.. Got RAM ? To be honest the cron job to lookup IPS is a more elegant solution, and no I wouldn't call such a thing a "hack". infact I know webtrends does that .... Marek

« previous php.general (#207404) next »