Re: safe_rename() and verifying the result of link(2)

2018-08-22 Thread Derek Martin
On Wed, Aug 22, 2018 at 11:12:39AM -0700, Kevin J. McCarthy wrote: > On Wed, Aug 22, 2018 at 10:04:12AM -0500, Derek Martin wrote: > > I actually think that the MH folder code is at fault here, not the > > stat() call in safe_rename(), despite potential issues with the latter. > > If safe_rename()

Re: safe_rename() and verifying the result of link(2)

2018-08-22 Thread Kevin J. McCarthy
On Wed, Aug 22, 2018 at 10:04:12AM -0500, Derek Martin wrote: > I actually think that the MH folder code is at fault here, not the > stat() call in safe_rename(), despite potential issues with the latter. > If safe_rename() fails with EEXIST, what logic suggests retrying > forever is a good idea?

Re: safe_rename() and verifying the result of link(2)

2018-08-22 Thread Derek Martin
On Tue, Aug 21, 2018 at 03:37:23PM -0700, Kevin J. McCarthy wrote: > On Wed, Aug 22, 2018 at 07:13:21AM +1000, Cameron Simpson wrote: > > On 21Aug2018 07:07, Kevin J. McCarthy wrote: > > > On Tue, Aug 21, 2018 at 11:30:03AM +0200, Vincent Lefevre wrote: > > > > But as I understand it, this means

Re: safe_rename() and verifying the result of link(2)

2018-08-22 Thread Steffen Nurpmeso
Vincent Lefevre wrote in <20180821230229.ga16...@zira.vinc17.org>: |On 2018-08-21 07:07:15 -0700, Kevin J. McCarthy wrote: |> I don't like removing 20-year old safety checks, but I think it's okay |> to do so for the case where link() returns 0. | |I was also hesitant, but after thinking more