cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Locking a file on the Http Server

From: Haber, Orna <Orna.Haber_at_ca.com>
Date: Fri, 24 Jun 2005 13:07:22 -0400

Yes. You got this right.
My thought about using a shared object and provide a lock-function in
order to create a cookie on the server machine or create a
"lock"-key-value in the server's registry (DNS cache).
Of course I have the problem of using the same shared object by
processes running on different machines..(:-)
Thanks for your reply,
 Orna

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Ralph Mitchell
Sent: Thursday, June 23, 2005 8:07 PM
To: libcurl development
Subject: Re: Locking a file on the Http Server

Let me see if I got this straight - there's a file on a web server,
and it's being access from multiple different clients. You want to
lock it so that it can only be accessed by one client at a time. Is
that right??

If so, it sounds like something the web server needs to handle. The
curl instances on different machine won't have a clue about locks on
other machines.

Ralph Mitchell

On 6/23/05, Haber, Orna <Orna.Haber_at_ca.com> wrote:
>
>
>
> Question:
>
> I would like to lock a file I access via Http (using curl library).
>
> The situation I'm trying to guard is:
>
> Different processes running on different machines that may access the
same
> file by Http (using curl lib).
>
> I would like the first process to lock the file so that other
processes
> running on different machines
>
> Will not be able to access this file, until the lock is released.
>
> I was reading about the shared object and the locking that curl
provides.
>
> I can tell the shared object what data I want to share.
>
> The problem is that this feature allows several easy handles share the
same
> shared handle.
>
> Can I share the same shared handle across different machines?
>
> Any ideas how I can achieve this locking by Curl?
>
> Thanks,
>
> Orna
>
>
Received on 2005-06-24