[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: File Locking



>>>>> "Christian" == Christian Schwarz <schwarz@monet.m.isar.de> writes:

    Christian> Karl, thanks for the nice summary!

You're welcome. :-)

    Christian> On 16 Jun 1997, Karl M. Hegbloom wrote:

    >> ** Publib looks like it might already be the library needing to
    >> be created that was mentioned earlier... or at least a very
    >> good start.

    Christian> Thanks for pointing that out! I just had a look at
    Christian> "publib" and the "lockfile.c" is really very
    Christian> concrete. (There is no documentation, though :-( )

 No documentation?  Sure there is.  There's a manual page for every
function in the libc, and if you've got Emacs or XEmacs, and
`libc-mode', you can look up the docs in the TeXinfo with a few
keypushes.  To read a manual page, just type {M-x man ENTER} and the
name of the manual you want.  It defaults to the word the cursor was
on.

 I wonder, should it utilize libuuid in some way?  (I've a lot of
reading to do...)  It seems that what should happen is that when a
lockfile is made, inside it should be the `sysid' of the computer
creating the lock, as well as the PID of the process on that computer.

 I think the real way is for the `flock' structure, (through
<fcntl.h>) to contain a l_sysid field.  With that, the kernel will
have a place to keep track of which machine holds the lock on a file.
It should be supported by the kernel-level nfs system, so that a
normal `flock', `fcntl', or `lockf' will work across nfs, without the
need for a dotfile kludge-hammer.  I really need to read a lot more
about this type of thing.  I've a feeling it will built into the next
major kernel release.

    Christian> If we choose to go with "publib", someone would have to
    Christian> change the static lib into a shared one, but this is
    Christian> quite easy.

 Ok.. Lars Wirzenius <liw@iki.fi> is the author and maintainer of
publib.  Lars, are you reading us?

    Christian> [snip]
    >> Q: Who will do the work?

    Christian> This is really a good question. Don't we have a
    Christian> volunteer here on debian-devel?

    >> I am doubtful of my own ability to be of much help...  I'd like
    >> to see what gets done by the programmer though.

    Christian> If you are intrested in doing it, we don't care if you
    Christian> have experience or not :-)

Ok, I'll try.  I can learn as we go.  I know how to use XEmacs and CVS
a little bit.  (That's what I've been wasting my time on, instead of
doing math homework or ...)

    Christian> I'd really like to have some people start working on
    Christian> this. I don't have much experience on this but I would
    Christian> try to get a first version running--unless noone else
    Christian> volunteers.

Lars Wirzenius?  What are your plans for publib?


 I just saw the upload announcement for the latest `procmail' and
`smartlist' packages, and see that they have both just been GPL'd.
That means we can utilize the locking and `robustness' code from them,
methinks...

 So, mainly, we need to put together a quick `liblockfile.so', and
then create a perl interface to it?  Hmmm.  I wonder if SWIG would do
that easily enough?


 Well... I need to get out of the mailbox for a while, and spend the
day reading source code.  (and I have a Scheme assignment to finish
today also.)

-- 
Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.3  Linux 2.1.36 AMD K5 PR-133


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: