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")
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 25 Oct 2008 08:45:29 -0700
- Subject: Re: [RFA/RFC] new setting against auto-answer? (because "input not from terminal")
- References: <20081025010445.GC29038@adacore.com> <ur665m75e.fsf@gnu.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. In the case of ssh to cygwin sshd, it's expected, since
my understanding is that cygwin uses pipes. There is also another
context that we use to run GDB, which is GPS. I need to double-check
with one of my collegues in Spain, but I believe that GPS creates a
console, and somehow MinGW's isatty also returns zero.
I assume that the first issue (with cygwin sshd) is fixable, since
running cygwin's GDB, the debugger detects a "terminal" and runs in
the right mode. I'll take a look at the sources and see if I can find
something.
In the second case, I don't really know. Perhaps fixing the first
case will fix this one as well.
--
Joel