From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27602 invoked by alias); 15 Nov 2008 15:00:06 -0000 Received: (qmail 15660 invoked by uid 48); 15 Nov 2008 14:58:41 -0000 Date: Sat, 15 Nov 2008 15:00:00 -0000 Message-ID: <20081115145841.15657.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/38122] "file already opened in another unit" error when opening /dev/null or /dev/tty twice In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg01196.txt.bz2 ------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-11-15 14:58 ------- Well I managed to read that thread about 90% through without falling to sleep. One point made there is that gfortran should not reposition the file after a reopen as the default position= specifier should be ASIS. I will check into this one point. If anyone sees any other Fortran Standard specifics we may be missing, let me know so I can fix those. I do believe that one could write a standard conforming "layer" in Fortran to handle all of the OPs issues. Obviously one would have to get creative to do it. The other thing that was not mentioned is ASYNCHRONOUS I/O which might be the real solution here. I/O calls would be queued in and allow the application to track status with the ID. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38122