PHP 4.0 Bug #9042 Updated: Patch for exec() - one character output doesn't work
| From: | sniper@php.net | Date: | Thu, 22 Feb 2001 23:47:56 +0000 |
| Subject: | PHP 4.0 Bug #9042 Updated: Patch for exec() - one character output doesn't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47302@lists.php.net to get a copy of this message | ||
ID: 9042
Updated by: sniper
Reported By: tunacat@yahoo.com
Status: Open
Old-Bug Type: Unknown/Other Function
Bug Type: Program Execution
Assigned To:
Comments:
reclassify
Previous Comments:
---------------------------------------------------------------------------
[2001-01-31 19:56:55] tunacat@yahoo.com
When I exec() a program, and the program produces a single character as output (no newline), the
output does not make it back to PHP.
Here is a patch to fix the problem:
*** exec.c.orig Wed Jan 31 16:06:57 2001
--- exec.c Wed Jan 31 16:16:38 2001
***************
*** 163,170 ****
/* strip trailing spaces */
l = strlen(buf);
t = l;
! while (l && isspace((int)buf[--l]));
! if (l < t) buf[l + 1] = '