This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38122] "file already opened in another unit" error when opening /dev/null or /dev/tty twice
- From: "jvdelisle at verizon dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2008 19:13:52 -0000
- Subject: [Bug fortran/38122] "file already opened in another unit" error when opening /dev/null or /dev/tty twice
- References: <bug-38122-14861@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jvdelisle at verizon dot net 2008-11-15 19:13 -------
Subject: Re: "file already opened in another unit" error
when opening /dev/null or /dev/tty twice
> Which OP? The originator of the c.l.f thread or the originator of
> this bug report.
Originator of this bug report. And what I am trying to say is that the NONMEM
folks could write their code so that it does not violate the standard and deals
with any need for multi-threading.
>
> As Tobias points out, attaching 2 or more unit numbers to the same
> file would open gfortran to race conditions.
Agree, don't attach 2 or more unit numbers to the same file. I have written
rudimentary multi-tasking and multi-threading code myself even when not
supported by the OS. Yes, its extra work and most system programmers would
cringe at the thought of doing that in Fortran. Respectfully, the NONMEM team
needs to fix their code.
> $0.02
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38122