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

Problems using liblockfile.



I'm trying to figure out maillock so that I can use it in emacs20's
movemail, and I'm not sure I fully understand it's proper use.  First
of all, is it a function that an ordinary user's supposed to be able
to call to lock their mail file, or is it something that has to be
called as root (or mail)?

(Shouldn't fetchmail, smail, sendmail, etc. be converted to
liblockfile?  We could be losing mail otherwise, no?)

Anyway, I wrote the following simple program just to test to be sure I
understood what was going on, and it fails when run as me with
L_TMPLOCK where L_TMPLOCK is defined as:

   #define L_TMPLOCK   2    /* Error creating tmp lockfile          */

Here's the test program...

  #include <unistd.h>
  #include <maillock.h>
  #include <stdio.h>

  int
  main(int argc, char *argv[]) {
    printf("%d\n", (int) maillock("rlb", 1));
    sleep(30);
    mailunlock();
    return 0;
  }

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30


--
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: