From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21050 invoked by alias); 15 Nov 2008 10:43:28 -0000 Received: (qmail 10273 invoked by uid 48); 15 Nov 2008 10:42:04 -0000 Date: Sat, 15 Nov 2008 10:43:00 -0000 Message-ID: <20081115104204.10272.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: "burnus 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/msg01186.txt.bz2 ------- Comment #4 from burnus at gcc dot gnu dot org 2008-11-15 10:42 ------- > It's not a bug in my program. It's a bug in NONMEM VI. That is, assuming that > /dev/tty and /dev/null are files, which they're not. They're devices. > Regardless, it's code that runs in an older version that doesn't run in a new > version. This problem will cause people to use the old version of the compiler. The problem with accessing the same file with different I/O units is that it quickly leads to race conditions; for /dev/null I don't see any problem, but for a normal, seekable file like "my_data_file.dat" this is different. See also: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bd22f289feb99d22/ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38122