X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A06C63B.60106@gmail.com> Date: Sun, 10 May 2009 22:19:07 +1000 From: David Billinghurst User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: gfortran-4 problem: stdout is lost when redirected Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 I have a problem with cygwin gfortran 4.3.2 20080827 on cygwin-1.7. Text written to stdout (unit 6) is lost when redirected. The problem goes away if I add a "close(6)" statement, so the buffer may not be flushed properly. I don't see the problem with vanilla gcc-4.4.0 or gcc-trunk, compiled from source. These versions still use static libraries, so I am unsure if the problem has been fixed, or if it is due to the patches in the cygwin version of 4.3.2. Also, the problem doesn't occur with cygwin-1.5. $ cat j.f90 write(6,*) 'hello' end $ gfortran-4 -o j.exe j.f90 $ ./j hello $ ./j > j.txt $ cat j.txt $ cat j-close.f90 write(6,*) 'hello' close(6) end $ gfortran-4 -o j-close.exe j-close.f90 $ ./j-close hello $ ./j-close > j-close.txt $ cat j-close.txt hello -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/