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

2016-07-04 Thread Ben Pfaff
On Mon, Jul 04, 2016 at 06:02:31PM +, Alin Serdean wrote: > > > 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

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

2016-07-04 Thread Alin Serdean
> > 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 th

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

2016-07-04 Thread Alin Serdean
> > 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 > > I'm still not s

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

2016-07-04 Thread Ben Pfaff
On Fri, Jul 01, 2016 at 04:27:49PM +, Paul Boca wrote: > If the PID file isn't locked then appctl.py detects it as stale and > bails out without doing anything. Because of this lots of Python tests fail. > Also this protects the PID file from being overwritten. > > I used only shared lock, in

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

2016-07-04 Thread Paul Boca
windows: Added lockf function and lock PID file > > > -Mesaj original- > > De la: dev [mailto:dev-boun...@openvswitch.org] În numele Paul Boca > > Trimis: Friday, July 1, 2016 7:28 PM > > Către: dev@openvswitch.org > > Subiect: [ovs-dev] [PATCH V5] win

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

2016-07-04 Thread Alin Serdean
> -Mesaj original- > De la: dev [mailto:dev-boun...@openvswitch.org] În numele Paul Boca > Trimis: Friday, July 1, 2016 7:28 PM > Către: dev@openvswitch.org > Subiect: [ovs-dev] [PATCH V5] windows: Added lockf function and lock PID > file > > If the PID file isn

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

2016-07-01 Thread Paul Boca
If the PID file isn't locked then appctl.py detects it as stale and bails out without doing anything. Because of this lots of Python tests fail. Also this protects the PID file from being overwritten. I used only shared lock, in order to be compatible with Python tests, which try to acquire the lo