<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 14, 2014 at 1:40 AM, Tobias Dammers <span dir="ltr"><<a href="mailto:tdammers@gmail.com" target="_blank">tdammers@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>It is not the same thing, really, unless I'm misunderstanding. AFAIK there is no straightforward way of making the combined check-if-exists-and-delete block atomic at the bearsden level, even if you force serial execution at the haskell level, and the established solution is to forgo the existence check altogether, relying on the delete call to throw when the file doesn't exist.</p>


<div class="gmail_quote"><div><div class="h5"></div></div></div></blockquote><div>Yes; this is my point, there is no way to make the separate check atomic. It's going to be two system calls which will allow task switching at syscall entry and thereby allow a race against another process; no amount of careful critical section handling within the process can stop this.</div>
<div><br></div></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>