Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lock and unlock a file
Message
From
14/07/2016 02:06:12
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01638353
Message ID:
01638367
Views:
58
>>So, this is the answer on the second part of your question. Most likely if your application will not be shutdown properly, the file will remain locked. I do remember long time ago we did unlock files using some special tool.
>
>Therefore I cannot use this semaphore locking approach. Because sooner or later it will fail and there will be a problem. So I will work on another approach.

Actually I think the semaphore file approach is slower for what you're trying to achieve. The whole idea of client-server is to do as much on the server as possible, and pass only commands and results across the wire. Directory access is among slower things in that respect (just remember the issues with path in the fxp we had this week). On top of that, there are issues with special folders, UAC, virtualization etc, so the behavior of a folder may not be what you expect, and it may change because some IT cerberus may wake up thinking he hasn't done enough and tries to introduce yet another security measure without telling anyone.

Also, some of the versions of network protocol under Windowses may decide that you shouldn't keep a file open for too long, and may just decide to close it for you. I've seen it several times since Windows 98, it's a feature that gets turned on or off under mysterious circumstances, never caught any logic to it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform