delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/01/23:13:17

From: Ian AT kiwiplan DOT co DOT nz (Ian Collins)
Subject: gdb and isatty call
1 Dec 1997 23:13:17 -0800 :
Message-ID: <07551A47EAD6D01186430060B025C6F41B6F67.cygnus.gnu-win32@ntserver.kiwiplan2.co.nz>
Mime-Version: 1.0
To: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

When I run gdb, isatty always says I do not have a tty.

For example,

#include <stdio.h>
main()
{
	extern int isatty();

	FILE *lf;
	lf = fopen("/usr3/ian/fubar", "w+");
	fprintf(lf, "started\n");
	if (isatty(fileno(stdin))) {
		fprintf(lf, "interactive\n");
	}
	else {
		fprintf(lf, "batch\n");
	}
}

That works fine (or at least as expected) when run interactively or in
batch, but if I run it in gdb (with or without the -nw flag), isatty
thinks I am in batch.

Any ideas? (I'm running NT 4 SP3 with Gnu B18 with latest Sergeys
patches).

Ian Collins. 
KIWIPLAN NZ.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019