Is archiving synchronized ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is archiving synchronized ?

Prasad B-2
Hello,

If 2 or more processes insert files into the same archive, are the
accesses serialized ? If not, the integrity of the archive file is
suspect. Isn't it so ?

thank you,
Prasad
Reply | Threaded
Open this post in threaded view
|

Re: Is archiving synchronized ?

Daniel Jacobowitz-2
On Sun, Jan 29, 2006 at 10:24:01PM -0700, Prasad Venkata Boddupalli wrote:
> Hello,
>
> If 2 or more processes insert files into the same archive, are the
> accesses serialized ? If not, the integrity of the archive file is
> suspect. Isn't it so ?

It's your responsibility to lock the archive, in that case.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: Is archiving synchronized ?

Prasad B-2
On Mon, 30 Jan 2006, Daniel Jacobowitz wrote:

>> If 2 or more processes insert files into the same archive, are the
>> accesses serialized ? If not, the integrity of the archive file is
>> suspect. Isn't it so ?
>
> It's your responsibility to lock the archive, in that case.

Thank you. I was just wondering if 'ar' acquires write-lock on the
archive file before pushing the file in. From your answer, it doesn't.
Thanks once again.

Prasad.
Reply | Threaded
Open this post in threaded view
|

Re: Is archiving synchronized ?

Mike Frysinger
On Monday 30 January 2006 00:51, Prasad Venkata Boddupalli wrote:
> On Mon, 30 Jan 2006, Daniel Jacobowitz wrote:
> >> If 2 or more processes insert files into the same archive, are the
> >> accesses serialized ? If not, the integrity of the archive file is
> >> suspect. Isn't it so ?
> >
> > It's your responsibility to lock the archive, in that case.
>
> Thank you. I was just wondering if 'ar' acquires write-lock on the
> archive file before pushing the file in.

iirc, ar just creates a temp file in the same dir as the ar you're working on,
utilizes that for updates, and then renames it to the original file
-mike