Re: cvs: php4 /ext/standard exec.c
| From: | Sascha Schumann | Date: | Tue, 27 Jun 2000 21:07:59 +0000 |
| Subject: | Re: cvs: php4 /ext/standard exec.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-515@lists.php.net to get a copy of this message | ||
On Tue, 27 Jun 2000, Stanislav Malyshev wrote:
> SS>> The `b' should be ignored by all STDIO implementations which
> SS>> don't differentiate between text and binary files. Did you
> SS>> find an implementation which does not behave correctly?
>
> I've read source of glibc popen. And there it compares popen argument to
> be "r" or "w" only. One character. It doesn't work otherwise. And yes,
> I
> was bitten by this - I don't usually enjoy reading glibc sources without
> good reason, call me boring on that :)
According to SuS II, the behaviour of the implementation is
undefined, if the application specifies non-standard
characters in the type argument to popen(). In plain English,
you probably will get a segfault on Solaris, so that the
change is valid.
Nevertheless, it looks like the mode "rb" should work with
the current glibc code (2.2 CVS) and glibc-2.1.3, because the
'b' is ignored.
- Sascha