<div class="gmail_quote">On Mon, Feb 14, 2011 at 20:54, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":3nk">You could do that. But I think it is better to not generate an error at all by first checking if you can actually open the file before trying to open it.<br></div></blockquote><div><br></div><div>That's a race condition. Opening a file is atomic, testing and then opening is not.</div>
</div>