public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-ugdb: use isatty to detect tty-ness
@ 2010-08-13 16:29 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2010-08-13 16:29 UTC (permalink / raw)
To: archer-commits
The branch, archer-ugdb has been updated
via 295b84860c352c5fa6f93d09808ba08e2a40e1cd (commit)
from 53062f27ce39c249a60e6d764a6487656883298a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 295b84860c352c5fa6f93d09808ba08e2a40e1cd
Author: Tom Tromey <tromey@redhat.com>
Date: Fri Aug 13 10:29:24 2010 -0600
use isatty to detect tty-ness
-----------------------------------------------------------------------
Summary of changes:
gdb/ser-unix.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
First 500 lines of diff:
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 5ff41e7..447de18 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -32,7 +32,6 @@
#include "gdb_select.h"
#include "gdb_string.h"
#include "gdbcmd.h"
-#include "gdb_stat.h"
#ifdef HAVE_TERMIOS
@@ -142,13 +141,11 @@ get_pipe_like_ops (void)
static int
hardwire_open (struct serial *scb, const char *name)
{
- struct stat buf;
-
scb->fd = open (name, O_RDWR);
if (scb->fd < 0)
return -1;
- if (fstat (scb->fd, &buf) == 0 && !S_ISCHR (buf.st_mode))
+ if (!isatty (scb->fd))
{
/* Super hack! */
scb->ops = get_pipe_like_ops ();
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-13 16:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13 16:29 [SCM] archer-ugdb: use isatty to detect tty-ness tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).