delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/12/08/01:53:51

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
From: Ian Collins <bagpuss AT ihug DOT co DOT nz>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: termio from vc++ console app
Date: Wed, 8 Dec 1999 18:31:33 +1300
X-Mailer: KMail [version 1.0.28]
MIME-Version: 1.0
Message-Id: <99120818322301.22818@p427-tnt6>

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)

Is there any way to do this??

//
// Example code...
//
#include "stdafx.h"
#include <stdio.h>
#include <io.h>

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 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019