[Top][All Lists]

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

[bug-mailutils] Lock with external program question

From: Kostas Zorbadelos
Subject: [bug-mailutils] Lock with external program question
Date: Wed, 21 Sep 2005 18:46:06 +0300
User-agent: Mutt/1.5.9i

I see in your locking framework that you provide the possibility to
use an external program to do the locking of a mailbox.
Can you please give me an example as to how to accomplish this?
Let's say I need to lock the mbox file in path /a/b/c/xxx with my own
program. I imagine I will do 

- mu_mailbox_create (&mbox,path)
- mu_mailbox_open  (mbox, MU_STREAM_RDWR|MU_STREAM_CREAT)
- mu_mailbox_get_locker (mbox, &lock)
- mu_locker_lock (lock) (at this point my external program will spawn
and lock the file using its methods)
- do stuff with the mailbox...
- mu_locker_unlock (lock) (the external program spawns again)

Am I correct and if so, where do I declare the external program and
what arguments is it expected to have?


  Kostas Zorbadelos
  Systems Designer/Developer, Otenet SA 
  address@hidden contact: kzorba (at) otenet.gr
  Out there in the darkness, out there in the night
  out there in the starlight, one soul burns brighter
  than a thousand suns.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]