Bug #9042 Updated: Patch for exec() - one character output doesn't work
| From: | elixer@php.net | Date: | Sat, 28 Apr 2001 13:21:29 +0000 |
| Subject: | Bug #9042 Updated: Patch for exec() - one character output doesn't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52699@lists.php.net to get a copy of this message | ||
ID: 9042
Updated by: elixer
Reported By: tunacat@yahoo.com
Status: Open
Bug Type: Program Execution
PHP Version: 4.0.4pl1
Assigned To:
Comments:
Thank you for your patch. Its now fixed in CVS. It will be in 4.0.6.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-22 18:47:56] sniper@php.net
reclassify
---------------------------------------------------------------------------
[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] = '