>How should one translates those flock() and
>rlock() in legacy FoxPro applications?
It's going to depend on how your VFP application buffers its tables, whether you use transactions, and when you expect a record to become unavailable to others for other than read purposes. Acquiring a lock at the start of an edit corresponds closely to a pessimistic lock strategy, while acquiring the lock immediately before revised data is written into the table corresponds to an optimistic strategy.
In some circumstances, the use of RLOCK() and FLOCK() can and should remain in place, especially if you choose not to use table buffering in your application. The commands are still in the language and are still useful in a number of application contexts.