Re: [RFA/RFC] new setting against auto-answer? (because "input not from terminal")

Eli Zaretskii
2008-10-25T17:46:39Z

> Date: Sat, 25 Oct 2008 08:45:29 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> > Is the problem with isatty returning the wrong value? If so, did you
> > (or can you) try the following trick?
> >
> > #define ISATTY(fd) (isatty(fd) && lseek(fd,SEEK_CUR,0) == -1)
> >
> > and then use ISATTY instead of isatty?
>
> That wouldn't work, unfortunately, because the problem is that isatty
> returns zero.

What does lseek return with the above arguments?