[ovs-dev] [PATCH V5] windows: Added lockf function and lock PID file

Alin Serdean aserdean at cloudbasesolutions.com
Mon Jul 4 15:21:44 UTC 2016


> > I used only shared lock, in order to be compatible with Python tests,
> > which try to acquire the lock exclusively. On Windows if the exclusive
> > lock is used, than the read access is denied too for other instances of this
> file.
> >
> > Signed-off-by: Paul-Daniel Boca <pboca at cloudbasesolutions.com>
> 
> I'm still not sure that real locking is actually needed for Windows.
> I believe that, on Windows, the functionality of a lock file only requires
> holding the file open.  For a program to detect whether the lock file is locked,
> it can just try to delete it; on Windows, I believe that deleting an open file
> fails.
[Alin Gabriel Serdean: ] That is correct Ben. But think about somebody which is using python and coming from a Unix environment, he will try to read/write to the locked file. In my opinion we should try to mimic that behavior.
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev


More information about the dev mailing list