[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Lock with external program question
From: |
Kostas Zorbadelos |
Subject: |
Re: [bug-mailutils] Lock with external program question |
Date: |
Wed, 21 Sep 2005 19:47:53 +0300 |
User-agent: |
Mutt/1.5.9i |
On Wed, Sep 21, 2005 at 06:46:06PM +0300, Kostas Zorbadelos wrote:
Please discard this question. Our decision in not to use an external
program (as it will spawn an external process). Instead we would like
to implement another locking method or extend the ones found in
locker.c
Will lets you know and send patches.
> 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
--
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.