note 60212 added to language.operators.execution
| From: | cs at kainaw dot com | Date: | Thu, 29 Dec 2005 22:55:21 +0000 |
| Subject: | note 60212 added to language.operators.execution | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100963@lists.php.net to get a copy of this message | ||
After much trouble, I have concluded that the backtick operator (and shell_exec) have a limited
buffer for the return. My problem was that I was grepping a file with over 500,000 lines, receiving
a response with well over 100,000 lines. After a short pause, I was flooded with errors from grep
about the pipe being closed.
I have searched, but I cannot find the exact size of the buffer used by the backtick operator and
shell_exec. So, to avoid this error, you must limit the output of your commands (such as using -m
with grep). Through trial and error, you can get the command to run without error.
----
Manual Page -- http://www.php.net/manual/en/language.operators.execution.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60212
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60212&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60212&report=yes
Search -- http://master.php.net/manage/user-notes.php