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).
begin:vcard
fn:Nigel Horne
n:Horne;Nigel
org:NJH Music
email;internet:[EMAIL PROTECTED]
tel;fax:+44 870 705 9334
note:Skype: nigelhorne
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev