From: Alex Riesen Date: Fri, 24 Apr 2009 05:44:18 GMT Subject: Re: [PATCH] Add an option not to use link(src, dest) && unlink(src) when that is unreliable Message-ID: <81b0412b0904232244l15cd7347n23702d92b38ab7e5@mail.gmail.com> In-Reply-To: 2009/4/23 Johannes Schindelin : > Hi, > > On Thu, 23 Apr 2009, Alex Riesen wrote: > >> 2009/4/23 Johannes Schindelin : >> > -       if (link(tmpfile, filename)) >> > +       if (unreliable_hardlinks) >> > +               ret = ~EEXIST; >> >> It is more like "broken_hardlinks" or even "no_hardlinks"! > > Wrong.  As I wrote, single-stepping (i.e. leaving enough time between > link() and unlink()) works as expected.  So it is not even that the > hardlinks are broken.  Just the serialization between the operations. > Since when does link(2) involve file _data_?