Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm 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: <38544BFF.8AD0D3C1@ihug.co.nz> Date: Mon, 13 Dec 1999 14:29:36 +1300 From: Ian Collins X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: gnu , Earnie Boyd Subject: Visual C++ apps in a "telnet" window Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit (Message used to be Visual C++ apps in a bash window) Thanks for the reply, Earnie. Replacing tty with notty in CYGWIN variable did the trick for the bash window. However, it doesn't work for a telnet window started from inetd. Any ideas? Regards, Ian Collins. =================================================== Does your CYGWIN environment variable contain "tty"? If so, this is most likely the reason you can't get it to work. Either remove tty or use the notty switch. Earnie. --- Ian Collins wrote: > I am trying to get an application that was compiled/linked under Visual > C++ to work in a bash window. > The application requires that i/o be performed in "raw" mode, (i.e., > using ioctl, isatty, etc calls). > > When the application is run in an NT cmd window (dos prompt!), it runs > fine. > When run in a bash shell, isatty returns 0 (not in a terminal), and the > ioctl calls return > "Invalid Arguments". > > Does anyone know how to make this work? > > I have a Console Application created with Visual C++, and want to run it > in > a bash window. > When the application is run (see code below), printf works fine, but > isatty(fileno(stdin)) returns 0 (no terminal attached). Also any ioctl > calls return a failure > > Is there any way to do this?? > > // > // Example code... > // > #include "stdafx.h" > #include > #include > > int main(int argc, char* argv[]) > { > int i; > i = _isatty(_fileno(stdin)); > printf("isatty returned: %d\n", i); > return 0; > } > > I also tried creating the same application using the MKS NutCracker > suite > (that application had ioctl) calls. > This application also fails (and the ioctl calls failed with "Invalid > Argument"). > > (A gut feeling - would compiling bash using VC++ solve the problem - > gulp!!). > > Regards, > Ian Collins > System Manager > KIWIPLAN NZ > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com