This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

stdin broken for windows console app under rxvt


Greetings

A simple console app compiled with MingW (-mno-cygwin) (or VC++) cannot
read from stdin when executed in an rxvt or xterm terminal:

#include <stdio.h>
main() {
  int c;
  fputc(isatty(stdin), stdout);
  while ((c = getc(stdin)) != EOF) fputc(c, stdout);
}

Furthermore, isatty(stdin) returns 0.

Both examples behave under cmd, or cmd/bash with CYGWIN=notty set, or if
they're compiled without the mingw flag.

Any clues gratefully accepted.

cheers
mark

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]