On Mon, Feb 14, 2011 at 20:54, Barry Smith <bsmith at mcs.anl.gov> wrote:

> 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.
>

That's a race condition. Opening a file is atomic, testing and then opening
is not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110214/cb0b0fdf/attachment.html>

Reply via email to