Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <19991102200114.15184.rocketmail@web221.mail.yahoo.com> Date: Tue, 2 Nov 1999 12:01:14 -0800 (PST) From: Keraba Subject: tcgetattr(0, &T) fails on redirection To: cygwin AT sourceware DOT cygnus DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii The following code: #include main() { struct termios T; if (tcgetattr(0, &T) == 0) printf("Succeeded\n"); else printf("Failed\n"); } works when I simply execute ./program but fails when I run ./program < file Is the standard input file descriptor not 0 in this case ? If so, how do I find out what it is ? Or perhaps one can't run tcgetattr on this file descriptor ? If its impossible, how does one put standard input into raw mode in this case ? __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com