delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/14/11:14:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Rolf Campbell <rcampbell AT tropicnetworks DOT com>
Subject: Re: cygwin 1.3.21 breaks ssh terminal interaction
Date: Fri, 14 Mar 2003 11:14:41 -0500
Lines: 105
Message-ID: <b4sv42$gkt$1@main.gmane.org>
References: <b4ssb7$26h$1 AT main DOT gmane DOT org> <Pine DOT LNX DOT 4 DOT 44 DOT 0303141646330 DOT 15498-100000 AT localhost DOT localdomain>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: en-us, en
In-Reply-To: <Pine.LNX.4.44.0303141646330.15498-100000@localhost.localdomain>

Sorry Ronald, but this program operated EXACTLY the same (on my machine) 
regardless of how it is compiled (with -mno-cygwin or not).
 From rxvt: Niether open a new console
 From cmd:  Niether open a new console
 From Emacs: Both open a new console

Ronald Landheer-Cieslak wrote:
> try using an AllocConsole() in your non-Cygwin app and in your Cygwin app, 
> like so:
> 
> #include <windows.h>
> #include <io.h>
> #include <stdio.h>
> #include <fcntl.h>
> 
> // STC for the phantom console 1.3.21-1 problem
> inline void OpenConsole(void)
> {
>    int hCrt;
>    FILE * hf;
> 
>    if (AllocConsole())
>    {
>       #ifndef __CYGWIN__
>       hCrt = _open_osfhandle((long)GetStdHandle(STD_ERROR_HANDLE), 
> _O_TEXT);
>       hf = _fdopen( hCrt, "w" );
>       #else
>       hf = fdopen( 2, "w" );
>       #endif
>       *stderr = *hf;
>       setvbuf( stderr, NULL, _IONBF, 0 );
>       #ifndef __CYGWIN__
>       hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), 
> _O_TEXT);
>       hf = _fdopen( hCrt, "w" );
>       #else
>       hf = fdopen( 1, "w" );
>       #endif
>       *stdout = *hf;
>       setvbuf( stdout, NULL, _IONBF, 0 );
>    }
> }
> 
> int main(void)
> {
> 	OpenConsole();
> 	
> 	printf("Hello, world!\n");
> 	
> 	return(0);
> }
> 
> Compile this with -mno-cygwin and without it, and run it from cmd. The 
> Cygwin app will allocate a new console, the native app won't.
> 
> Is that the STC you were looking for (or is it not the right problem)?
> 
> rlc
> 
> 
> On Fri, 14 Mar 2003, Rolf Campbell wrote:
> 
> 
>>Corinna Vinschen wrote:
>>
>>>On Fri, Mar 14, 2003 at 03:48:40PM +0100, Loewis Martin von wrote:
>>>
>>>
>>>>After upgrading to the latest cygwin, ssh won't ask me 
>>>>for a password anymore in the terminal window that WinCVS
>>>>1.3.12.1 opens. I have confirmed that this is the cause
>>>>of the problem by reverting cygwin to 1.3.20.
>>>>
>>>>The same happens when I run WinCVS' cvs.exe in a terminal
>>>>window.
>>>
>>>
>>>WFM with cvs from the Cygwin distro.
>>>
>>>Corinna
>>
>>I'll speculate that this is the same problem that I've seen using Emacs. 
>>  If everything is CygWin, then everything works just dandy.  But, 
>>something happens when a cygwin program runs a non-cygwin program (or 
>>vice-versa):  The launched app will disregard it's parent's "console" 
>>and create it's own.
>>
>>I've been trying to reproduce it with some relatively simple -mno-cygwin 
>>app, but so far, I've been unable to make any progress.
>>
>>-Rolf
>>
>>
>>
>>--
>>Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>>Bug reporting:         http://cygwin.com/bugs.html
>>Documentation:         http://cygwin.com/docs.html
>>FAQ:                   http://cygwin.com/faq/
>>
> 
> 
> 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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