>
Sent: Monday, September 09, 2002 3:23 AM
Subject: Re: locking a file in linux .. Havent tried it as yet
> But sir
>
>Will I be able to myself write into a file when I have locked it
>
>
>
>
> Mark Goland wrote:
>
> >This will do mandetory locking { which c
Thanx John, I have not tested it yet, but it looks right...will give it a
try 2nite.
Mark
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 7:35 AM
Subject: Re: locking a file in linux
Mark Goland wrote:
>
> This will do mandetory locking { which can also be done with "chmod +l
> filename"}. If someone can rewrite this into perl , that would be great.
>
> /*
>write by Mark Goland use and enjoy keep the tag
>[EMAIL PROTECTED]
> */
>
> #include
> #include
> int main(
<[EMAIL PROTECTED]>; "Michael Fowler" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 2:49 AM
Subject: Re: locking a file in linux
> Michael Fowler wrote:
> > On Mon, Sep 02, 2002 at 03:56:22PM +0530, Ramprasad A Padmanabhan wrote:
>
this is still better than checking for a .swp file. some editor never uses
any .swp files and doesn't even know the fact that another editor is opened
and is editing the same file at the same time.
what he can do is change:
next unless $p->cmndline =~ /vi.*tmp\.pl/;
the above line to include s
On Wed, 4 Sep 2002, Ramprasad A Padmanabhan wrote:
> Thanx All
>But I will still like to have kernel enforced mandatory locking on
> the file Can you tell me how to do it
For starters your kernel must support mandatory locking, after checking
that you will have to unmount the filesystem, e
Michael Fowler wrote:
> On Mon, Sep 02, 2002 at 03:56:22PM +0530, Ramprasad A Padmanabhan wrote:
>
>>Hi All,
>> I am writing an web application where multiple users may write into
>>the same file concurrently. Also there is a probability that there may
>>be an admin who has opened up the file
This is an interesting proposed solution. But as the poster pointed out
depends on whether they are *only* using vi, if that can be assured then
you might consider using the method by which vi does its own checking on
its own files. In other words check for a "..swp" or maybe a
"..sw*" file i
On Mon, Sep 02, 2002 at 03:56:22PM +0530, Ramprasad A Padmanabhan wrote:
> Hi All,
> I am writing an web application where multiple users may write into
> the same file concurrently. Also there is a probability that there may
> be an admin who has opened up the file in 'vi' and editing the fil
the tricky part is the "admin who has opened up the file in 'vi' and editing
the file". this kind of manually open editing behavior is hard to track for
the locking module that you just mention. the following provides you with a
simple(not perfect at all and it's slow) method and it searches you
On Mon, 2 Sep 2002, Ramprasad A Padmanabhan wrote:
> Hi All,
>I am writing an web application where multiple users may write into
> the same file concurrently. Also there is a probability that there may
> be an admin who has opened up the file in 'vi' and editing the file.
>
>I want to
Hi All,
I am writing an web application where multiple users may write into
the same file concurrently. Also there is a probability that there may
be an admin who has opened up the file in 'vi' and editing the file.
I want to avoid this concurrent multiple opens.
I tried a range on perl
12 matches
Mail list logo