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

Re: Policy wrt mail lockfile (section 4.3)

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

    Christian> This is buggy since it's not working over NFS. (I'm
    Christian> running into problems every few days since I use
    Christian> sendmail/procmail/pine over a NFS mounted
    Christian> /var/spool/mail !)

    Christian> That's the exact reason why I started this discussion
    Christian> again.

What happens?  Can you describe the problem?  Explain your setup in
more detail, please.  I would like to know more about the problems
that are encountered with nfs.

    Christian> There are also tools available, that do locking, for
    Christian> example "lockfile" in the procmail package. However,
    Christian> calling this program with "system" produces IMHO too
    Christian> much unnecessary overhead and the source code of this
    Christian> program is a bit to complicated to force all our
    Christian> developers to implement this.

 Unix is designed around peicing things together from small utility
programs, and fork/exec/wait probably doesn't really "cost" that
much...  on the other hand, putting the lockfile stuff into a shared
library is more estheticly appealing.

    Christian> IMHO, the code in "publib" looks very good. I suggest
    Christian> that we extract the necessary files and put them
    Christian> together in a new package, called "liblockfile" (or
    Christian> similar). This package should install a shared library
    Christian> "liblockfile.so" that contains a few necessary commands
    Christian> to lock/unlock/test a file.

 Solaris has a maillock library that is cloned in `qpopper'.  A manual
page for Sun's maillock can easily be found on the web.  I think that
qpopper's algorithm is superiour to the one in publib.  Will you have
a look at it?  Publib uses the return value from the stat call, which
you're not supposed to do.  (I don't know why yet.)

    Christian> In addition, we could create a new "lockfile" binary
    Christian> (just as in procmail) that can be used by shell scripts
    Christian> or other programs (via "system").

 I guess we should mimic the maillock library, but add a more general
function for creating a lock for any file, not just mail spools.  How
does DCE do it, I wonder?  I found libuuid in the ext2fsprogs.

 What's a lockd do?  I will search for that today.

    Christian> We'll also provide "modules" for Perl/Python/etc.

 Can you use SWIG for that, once we make a .so?

Karl M. Hegbloom <karlheg@inetarena.com>           finger or ytalk:
http://www.inetarena.com/~karlheg           karlheg@bittersweet.inetarena.com
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: