This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin 1.3.21 breaks ssh terminal interaction

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" );
hf = fdopen( 2, "w" );
*stderr = *hf;
setvbuf( stderr, NULL, _IONBF, 0 );
#ifndef __CYGWIN__
hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
hf = _fdopen( hCrt, "w" );
hf = fdopen( 1, "w" );
*stdout = *hf;
setvbuf( stdout, NULL, _IONBF, 0 );

int main(void)
	printf("Hello, world!\n");

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)?


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 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

WFM with cvs from the Cygwin distro.


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.


Unsubscribe info:
Bug reporting:

-- Unsubscribe info: Bug reporting: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]