cURL / Mailing Lists / curl-users / Single Mail


Re: bug in telnet.c?

From: Daniel Stenberg <>
Date: Tue, 27 Nov 2001 14:52:23 +0100 (MET)

On Tue, 27 Nov 2001, Hans Steegers wrote:

Thanks for your report!

> In lib/telnet.c is says "read from stdin", but the read is
> read(1,buf,255); which is stdout!

Now isn't that silly? ;-) The weird thing is that it has worked...

> Is this intended, to use stdout for reading?

No, it is not intended.

> Or is it a bug? If so:

You should also change the FD_SET() line before the while() loop and the
FD_ISSET() call that checks if there's data available from stdin.

See my suggested attached patch.

    Daniel Stenberg -- curl groks URLs --

Received on 2001-11-27