Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Re: cygwin 1.3.21 breaks ssh terminal interaction Date: Fri, 14 Mar 2003 11:14:41 -0500 Lines: 105 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: 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 > #include > #include > #include > > // 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/