Exclusive file access or serial access to external file 
Author Message
 Exclusive file access or serial access to external file

I apologize for not knowing quite all the specifics.  We are using
ParcPlace Smalltalk on Windows NT Workstation 4.0.  We are starting an
external (non-Smalltalk) utility to do some file manipulation for us.  Upon
completion of the utility, we want to read in the result produced by the
utility.  In our programmer's initial implementation, we found this was
somewhat problematic.  Smalltalk was capable of opening the file and
reading it before the utility completed.  This can't be.  

It seems as though several solutions should exist:

1) Try to open the file for exclusive access (This should theoretically
only succeed once the utility has completed).
2) Invoke the utility in a synchronous (blocking) fashion rather than an
asynchronous (non-blocking) fashion.
3) Attempt some form of file level lock (again, only successful once the
utility has completed).

Ideally, the answer should be portable (not use platform specific
primitives), however, should anyone know an NT specific solution please
elaborate also.  We have a tacky workaround but that too is not acceptable.

Much thanks,

Matt



Wed, 18 Jun 1902 08:00:00 GMT  
 Exclusive file access or serial access to external file

Can you have the utility rename the file when it's done?  That way
the smalltalk app won't see it until it's ready.

Quote:

> I apologize for not knowing quite all the specifics.  We are using
> ParcPlace Smalltalk on Windows NT Workstation 4.0.  We are starting an
> external (non-Smalltalk) utility to do some file manipulation for us.  Upon
> completion of the utility, we want to read in the result produced by the
> utility.  In our programmer's initial implementation, we found this was
> somewhat problematic.  Smalltalk was capable of opening the file and
> reading it before the utility completed.  This can't be.

> It seems as though several solutions should exist:

> 1) Try to open the file for exclusive access (This should theoretically
> only succeed once the utility has completed).
> 2) Invoke the utility in a synchronous (blocking) fashion rather than an
> asynchronous (non-blocking) fashion.
> 3) Attempt some form of file level lock (again, only successful once the
> utility has completed).

> Ideally, the answer should be portable (not use platform specific
> primitives), however, should anyone know an NT specific solution please
> elaborate also.  We have a tacky workaround but that too is not acceptable.

> Much thanks,

> Matt

--



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Terminal Server - .dat file exclusive access

2. Open File with Exclusive Access Mode Question

3. Exclusive file access

4. non-serial file access in VHDL

5. How do I access a file's last accessed attribute

6. Accessing MS Access Files from clarion

7. Two threads accessing the same file, different access modes

8. Accessing MS ACCESS Files how to

9. Accessing Clipper Files from Access

10. Accessing Clipper DBFCDX files from Access

11. Accessing mdb(access 2000) files on linux using python

12. Help! Access Fault on external access with char**

 

 
Powered by phpBB® Forum Software