about lock some codes.

From: Date: Thu, 27 Sep 2012 09:31:30 +0000
Subject: about lock some codes.
Groups: php.general 
Request: Send a blank email to php-general+get-319275@lists.php.net to get a copy of this message
Hello: I have a question now.the code is: $ftemp = fopen("$fdoc_tmp/temp_proxy", 'w'); fwrite($ftemp, $content); fclose($ftemp); exec("/usr/local/bin/gdnsproxy -a -f $fdoc_tmp/temp_proxy 1>$fdoc_tmp/dout 2>$fdoc_tmp/derr", $data, $ex_result); echo "ret=".$ex_result; As you see, If a process run these,this is right.But two processes run this codes. the order maybe is: 1.process 1 create the temp_proxy1 2.process 2 create the temp_proxy2 3.process 1 exec temp_proxy2 4.process 2 exec temp_proxy2 The temp_proxy1 can't exec. So,I want to know how to solve it. Thank you.

« previous php.general (#319275) next »