You (Michael Niksch) write:
>1. Mail handlers typically lock the folder, not some other file. I know
>there is /usr/spool/mail/user.lock, but this doesn't help as not all
>the folders I am dealing with are somebody's system mailbox.

        Which mail handlers?  mh, pine, elm, and other MUAs can all
do dot locking.  elm does it wrong, but that's another story.

>2. As afsd works asynchronously, if I release the lock on file B after
>closing file A there is probably no guarantee for the file server and
>for other AFS clients to see that information in the same order.

        From what I have been told from info-afs, in AFS33, fsync(2)
does not return successfully until after the file has been written to
the file server cache.  So you can do a flush and fsync before you
issue your fclose.
        What is it that you are trying to do with your program and the
mail clients?  It sounds like you're trying to reinvent the wheel.

                    Yours,
                            Larry Schwimmer
                            [EMAIL PROTECTED]


Reply via email to