On 6 Mar 2001, Alexandre Julliard wrote:
I'm not sure what you mean by 'exclusive access to the file'. If you mean file locking then this is not implemented, so there cannot be any race ;-) Currently the client is allowed to cache the descriptor, but before each read/write it checks with the server that the cache is still valid. There is a race that the handle can be modified between the check and the actual read, this will cause either a bad handle error or a read from the wrong file; but this is no different from what happens under Windows if the client is manipulating handles concurrently with a ReadFile.
What about having the file descriptor cache explictly invaildated? Like, the server keeps track of which file descriptors the various wine processes have cached, and if a process closes or performs some locking operation on a file descriptor, all the other wine proceses that are using that file descriptor are explictly notified. This way processes can assume a file descriptor is valid unless told otherwise... would this be any better performance-wise? Does it fit in to the wineserver architecture nicely? ;)
-Ryan