This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFC] new setting against auto-answer? (because "input not from terminal")
> 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?