Hi,
Not sure if this is a bug or something that has changed.
Using Regina 2.2 for Win32 (using NT/W2K) I can create
a 'lock' file using a command such as:
call lineout 'lockfile','blahblahblah'
The file 'lockfile' stays allocated until the program ends
(though I could also close it). If I try to delete this file from a
command prompt while the program is running and the file
is still open, I receive the error 'The process cannot access
the file because it is being used by another process'. This
is the behaviour I'd expect.
Moving to Regina 3.1 and using the same command, the
lockfile gets created but I can now delete it from a
command prompt even though it should still be open.
Any thoughts, and are there any workarounds that would
work in both 2.2 and 3.1?
(Apologies if this is already documented somewhere and
I've missed it).
Cheers.
Richard Vine
Logged In: YES
user_id=764083
Just tried this with 3.2 but same results, ie. file is not opened for
exclusive access for this process only and can be deleted by
another process.
Logged In: YES
user_id=764083
Just tried this with 3.2 but same results, ie. file is not opened for
exclusive access for this process only and can be deleted by
another process.
Logged In: YES
user_id=764083
I've done some more testing and have narrowed the problem
down. All the time normal REXX commands are being used, the
files are correctly open for write access. However, if you call an
external system command (eg. 'DIR'), this seems to result in the
files being closed. They can therefore be deleted even though
they should still be open for write.
Why does running an external command apparently close open
files?
Richard Vine
Logged In: YES
user_id=764083
Some quick code to prove this:
file='testfile.txt'
call lineout file,'anything'
say 'Try to delete 'file'...'
parse pull wait
"echo Try to delete "file" again..."
parse pull wait
While at the 'Try to delete' prompt, you can attempt to delete the
test file (eg. from another command prompt or explorer). For both
Regina 2.2 and 3.1/3.2, you cannot delete the file after the first
prompt. At the 'Try to delete again' prompt, it is possible to delete
the file under Regina 3.1/3.2 (at least under Win32). This is due
to an external command, echo, being invoked.
So, it looks like the LINEOUT() command is fine but something is
closing open files when an external command is called.
Richard Vine
Logged In: YES
user_id=764083
Not sure if anyone has seen this problem but I hadn't assigned it
to anyone (I've now changed it to REXX) so maybe no-one picks
it up? Sorry, first post and obviously don't have a clue what I'm
doing!
Logged In: YES
user_id=764083
Not sure if anyone has seen this problem but I hadn't assigned it
to anyone (I've now changed it to REXX) so maybe no-one picks
it up? Sorry, first post and obviously don't have a clue what I'm
doing!
Logged In: YES
user_id=764083
Not sure if anyone has seen this problem but I hadn't assigned it
to anyone (I've now changed it to REXX) so maybe no-one picks
it up? Sorry, first post and obviously don't have a clue what I'm
doing!