By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,303 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,303 IT Pros & Developers. It's quick & easy.

fwrite() takes several seconds to complete - really strange problem!

P: n/a
I'm using proc_open to write to a perl program. Sometimes (not always)
the fwrite function below takes about 10 seconds to complete. Most of
the time it takes about 0.001 seconds. I don't know what could cause
this strange problem... Does anyone have a clue of where to start
looking?

$xml = "<xml>...</xml>";

$start = array_sum(explode(' ', microtime()));

$process = proc_open(HOME_DIR . "/perl.pl", $descriptorspec, $pipes);

print (array_sum(explode(' ', microtime())) - $start);

fwrite($pipes[0], $xml);

print (array_sum(explode(' ', microtime())) - $start);
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.