Re: [PATCH] Add an option not to use link(src, dest) && unlink(src) when that is unreliable
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 23, 2009, 21:59 UTC
- Message-ID
- <alpine.DEB.1.00.0904232358520.10279@pacific.mpi-cbg.de>
- In-Reply-To
- <81b0412b0904231239qf317c02xbfa548d0011a0302@mail.gmail.com>
Hi,
On Thu, 23 Apr 2009, Alex Riesen wrote:
Show 6 quoted lines
> 2009/4/23 Johannes Schindelin <Johannes.Schindelin@gmx.de>: > > - 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.
Ciao, Dscho