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

Alin Serdean aserdean at cloudbasesolutions.com
Mon Jul 4 18:02:31 UTC 2016


> > 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.
Another problem would be we can write over the pid file and if we try to do something like
$a = type .\ovs-vswitchd.pid
taskkill.exe /PID $a /F
Would be bogus because someone could have changed it.

Alin.


More information about the dev mailing list