curl-users
Re: Bug#278691: -v to stderr
Date: Sat, 6 Nov 2004 14:38:12 +0100 (CET)
On Sat, 6 Nov 2004, Domenico Andreoli wrote:
> could you please explain to me why this patch is not portable? is maybe
> because of the explicit fd nubers? do not STDIN_FILENO, STDOUT_FILENO and
> STDERR_FILENO costants help to sort this out?
These two issues are my main concerns:
1. My man page on Linux for read() says ('count' is the number passed
in the third argument):
"If count is zero, read() returns zero and has no other results."
This patch assumes that reading zero bytes from a closed file descriptor
returns non-zero. It contradicts the man page and I am pretty confident
that at least some operating systems will behave differently.
2. /dev/null is unix and curl compiles and runs on a whole lot of other
systems too. It needs to be taken into account.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-11-06