This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Make Makefile.am work in parallel




--On Tuesday, May 07, 2002 03:27:46 PM -0300 Alexandre Oliva 
<aoliva@redhat.com> wrote:

> On May  7, 2002, Mark Mitchell <mark@codesourcery.com> wrote:
>
>> I've changed write_classfile to create "foo.class.tmp" and then call
>> "rename" to change it to "foo.class" after the file has been written.
>> Note that "rename" is guaranteed to be atomic.
>
> I don't think rename is really guaranteed to be atomic.  IIRC, on some
> OSs/file-systems, it is implemented as link&remove, but even this
> would be good enough for us.  As long as it's not copy&remove, which
> `mv' would do to move between different filesystems, when rename
> failed, we're safe.

We're wandering into irrelevancy, but just to be clear, I meant "atomic"
to refer to the creation of the new file, not elimination of the old one.

In other words, there's no point where the new file "partially" exists;
it's either there or it ain't.  I think you're saying this too, so that's
good.

Patch coming soon.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]