www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
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 <keraba AT yahoo DOT com> |
Subject: | tcgetattr(0, &T) fails on redirection |
To: | cygwin AT sourceware DOT cygnus DOT com |
MIME-Version: | 1.0 |
The following code: #include <sys/termios.h> 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |