Re: cvs: php4 /ext/standard exec.c
| From: | Andi Gutmans | Date: | Tue, 27 Jun 2000 18:10:27 +0000 |
| Subject: | Re: cvs: php4 /ext/standard exec.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-510@lists.php.net to get a copy of this message | ||
It seems that popen() is special and on Linux it doesn't ignore the "b"
and fails.
fopen() and other I/O functions on Linux do ignore "b".
Weird.
Andi
On Tue, 27 Jun 2000, Sascha Schumann wrote:
> On Mon, 26 Jun 2000, Stanislav Malyshev wrote:
>
> > stas Mon Jun 26 10:12:38 2000 EDT
> >
> > Modified files:
> > /php4/ext/standard exec.c
> > Log:
> > Make exec() fwork on Unix again
> >
> >
> > Index: php4/ext/standard/exec.c
> > diff -u php4/ext/standard/exec.c:1.36 php4/ext/standard/exec.c:1.37
> > --- php4/ext/standard/exec.c:1.36 Sun Jun 25 10:02:45 2000
> > +++ php4/ext/standard/exec.c Mon Jun 26 10:12:38 2000
> > @@ -15,7 +15,7 @@
> > | Author: Rasmus Lerdorf |
> > +----------------------------------------------------------------------+
> > */
> > -/* $Id: exec.c,v 1.36 2000/06/25 17:02:45 zeev Exp $ */
> > +/* $Id: exec.c,v 1.37 2000/06/26 17:12:38 stas Exp $ */
> >
> > #include <stdio.h>
> > #include "php.h"
> > @@ -86,7 +86,11 @@
> > tmp = php_escape_shell_cmd(d);
> > efree(d);
> > d = tmp;
> > +#ifdef PHP_WIN32
> > fp = V_POPEN(d, "rb");
>
> The `b' should be ignored by all STDIO implementations which
> don't differentiate between text and binary files. Did you
> find an implementation which does not behave correctly?
>
> - Sascha
>
>
>