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-Authentication-Warning: localhost.localdomain: ronald owned process doing -bs Date: Fri, 14 Mar 2003 17:35:01 +0100 (CET) From: Ronald Landheer-Cieslak X-X-Sender: ronald AT localhost DOT localdomain To: Rolf Campbell cc: cygwin AT cygwin DOT com Subject: Re: cygwin 1.3.21 breaks ssh terminal interaction In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII For me: rxvt: neither open a new console cmd: only Cygwin version opens a new console (I don't know enough of Emacs to try) gdb running from cmd: neither opens a new console $ uname -a CYGWIN_NT-4.0 nt4-rlandheer 1.3.21(0.77/3/2) 2003-03-12 00:24 i686 unknown unknown Cygwin Note that the console is opened & closed pretty quickly - but you won't see "Hello, world!" in cmd. For debugging, it may be a better idea to remove the "inline" rlc On Fri, 14 Mar 2003, Rolf Campbell wrote: > 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/ > -- 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/