Re: [pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Christian Hesse
Allan McRae on Wed, 2017/06/07 08:06: > On 07/06/17 07:56, Christian Hesse wrote: > > Allan McRae on Wed, 2017/06/07 07:37: > >> On 07/06/17 07:26, Christian Hesse wrote: > >>> From: Christian Hesse > >>> > >>> We used to check for file existens, but that suffers from stale lock > >>> files

Re: [pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Christian Hesse
Andrew Gregory on Tue, 2017/06/06 17:56: > On 06/06/17 at 11:26pm, Christian Hesse wrote: > > From: Christian Hesse > > > > We used to check for file existens, but that suffers from stale lock > > files caused by unexpected events like crash, shutdown, etc. > > > > Instead use flock() to lock t

Re: [pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Allan McRae
On 07/06/17 07:56, Christian Hesse wrote: > Allan McRae on Wed, 2017/06/07 07:37: >> On 07/06/17 07:26, Christian Hesse wrote: >>> From: Christian Hesse >>> >>> We used to check for file existens, but that suffers from stale lock >>> files caused by unexpected events like crash, shutdown, etc. >>

Re: [pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Andrew Gregory
On 06/06/17 at 11:26pm, Christian Hesse wrote: > From: Christian Hesse > > We used to check for file existens, but that suffers from stale lock > files caused by unexpected events like crash, shutdown, etc. > > Instead use flock() to lock the file. It does not matter whether or > not the file ex

[pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Christian Hesse
From: Christian Hesse We used to check for file existens, but that suffers from stale lock files caused by unexpected events like crash, shutdown, etc. Instead use flock() to lock the file. It does not matter whether or not the file exists but whether an exclusive lock can be obtained. Also rem