On Wed, Apr 25, 2012 at 03:19:26PM +0100, alanhowells.e4ward.com wrote: >> Please don't http://cygwin.com/acronyms/#TOFU >My apologies > >I know my test code wasn't robust, I just wanted to get something >going to prove any issues. Anyway, I still have the issue when using >std::cin. Let me start again and give you some programs and show you >what is happening. > >I have 4 programs, consoleout1 (a C# program calling PInvoke methods >which replicates Console.Out.WriteLine at its minimum), consoleout2 (a >c++ program calling the same Win32 methods as consoleout1), readin1 (a >c++ program that uses std::cin to read from the console) and readin2 >(a c++ program uses Win32 to read from the console). > >Here are the results >$ ./consoleout1.exe hello world | ./readin1.exe >$ ./consoleout1.exe hello world | ./readin1.exe >$ ./consoleout1.exe hello world | ./readin2.exe >hello >world >$ ./consoleout2.exe hello world | ./readin1.exe >$ ./consoleout2.exe hello world | ./readin1.exe >hello >world >$ ./consoleout2.exe hello world | ./readin2.exe >hello >world >$
I've built the c++ programs with mingw gcc and I can't duplicate the behavior. And, that's a relief because the behavior makes no sense. There should be no persistent state saved between opening of two different pipes. So, sorry, but the only theory I can raise is BLODA. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple