lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] ./WWW/Library/Implementation/HTTCP.c


From: Nigel Horne
Subject: Re: [Lynx-dev] ./WWW/Library/Implementation/HTTCP.c
Date: Mon, 26 Jun 2006 14:03:11 +0100
User-agent: Thunderbird 1.5.0.4 (X11/20060614)

Thomas Dickey wrote:
On Mon, Jun 26, 2006 at 01:19:32PM +0100, Nigel Horne wrote:
Suggested patch:

not quite ( the standard input is normally file descriptor 0 )


#ifdef UNIX
    if (fildes == 0) {
        /*
         *  0 can be a valid socket fd, but if it's a tty something must
         *  have gone wrong. - kw
         */
        if (isatty(fildes)) {
CTRACE((tfp, "HTDoRead - refusing to read fd 0 which is a tty!\n"));
+           SOCKET_ERRNO = EINVAL;
            return -1;
        }
    } else

If you look at the original code, you will clearly see that it is there
to capture errant calls to HTDoRead with stdin as the argument (hence
the -1 return when isatty(0) is true, my patch tells the caller WHY the
-1 return has happened).

Attachment: njh.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]