add stat check
authorJoey Hess <joeyh@joeyh.name>
Fri, 13 Nov 2015 17:22:45 +0000 (13:22 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 13 Nov 2015 17:22:45 +0000 (13:22 -0400)
commitc2cbe5619b5f21078a01b21a69b2074f2e6d2899
treeb82767ae199b542087ca27c2290a781e7b904425
parent88d94e674cbfd39e2cf5c4324419184ae637e0d1
add stat check

I have a strace taken on a lustre filesystem on which link() returned 0,
but didn't actually succeed, since the file already existed.

One of the linux man pages recommended using link followed by checking like
this. I was reading it yesterday, but cannot find it now.
Utility/LockFile/PidLock.hs