delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
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: | <38556203.88BD2325@ihug.co.nz> |
Date: | Tue, 14 Dec 1999 10:15:47 +1300 |
From: | Ian Collins <bagpuss AT ihug DOT co DOT nz> |
X-Mailer: | Mozilla 4.7 [en] (WinNT; I) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | gnu <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | Running win32 applications under inetd |
I am using Sergeys inetd port to start a telnet session. One of the applications I am running in the telnet session is a console application compiled under Visual C++. (Example source code follows). When run in a telnet session, this code (using isatty) always reports the terminal is non-interactive. When run in a bash console session (with CYGWIN notty set), this application works as expected (i.e, isatty says it is interactive). Does anyone have any ideas on how to fix this? Does it have something to do with the way the shell process is executed from inetd (or telnetd)? Example code: === snip === // // Example code... // // (Note: vc++ uses _isatty rather than isatty). #include "stdafx.h" #include <stdio.h> #include <io.h> int main(int argc, char* argv[]) { int i; if ( _isatty(_fileno(stdin))) { printf("terminal is interactive\n"); } else { printf("terminal is NON-interactive\n"); } return 0; } === snip === Regards, Ian Collins -- 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 |