|
| View previous topic :: View next topic |
| Author |
Message |
strider
Joined: 17 Jan 2005 Posts: 1
|
Posted: Mon Jan 17, 2005 12:41 am Post subject: Redirecting the output to /dev/null |
|
|
Hello,
I would like redirect output from several sources to /dev/null file. When I try to run this file:
| Code: |
program test
open(1,file='/dev/null')
open(2,file='/dev/null')
end
|
I get an error:
PGFIO-F-207/OPEN/unit=2/file is already connected to another unit.
File name = /dev/null
In source file test.f, at line number 4
Is there anything I can do?
Thanks in advance. |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Jan 17, 2005 12:20 pm Post subject: |
|
|
Hi Strider,
Unfortunately, we do not make any distinction of '/dev/null' from any other file and thus do not allow you to open it twice. However, you might be able to get the same behavior if you use "SCRATCH" files instead of redirecting the output. The output will be sent to this temporary file and when the program exits, the file is deleted.
| Code: | program test
open(1, status='SCRATCH')
open(2, status='SCRATCH')
end |
Hope this helps,
Mat |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|