Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

RE: File Locking

by ishamael (Beadle)
on Apr 26, 2000 at 19:22 UTC ( #9248=note: print w/replies, xml ) Need Help??

in reply to File Locking

it should be noted that sendmail (all versions, to my knowledge) ignores flock.
just blatently ignores it if you flock an mbox.
however, it does recognize its own locking system, which consists of a mboxname.lock file in the same directory as the mbox.
this does create problems with write access and such, and is just a horrible workaround in my opinion, however will work fine.

charlie schmidt

Replies are listed 'Best First'.
Re: RE: File Locking
by fokat (Deacon) on Oct 24, 2001 at 23:31 UTC
    This is not really the fault of sendmail in modern versions. sendmail has no knowledge about the user's mailbox. This is the task of mail.local, which is the one responsible of dealing with mailboxes.

    mail.local does require some form of file locking to prevent races in multiple message delivery scenarios. It attempts to use a number of schemes (fcntl(), lockf, flock, no locks at all) depending on the particular OS in which it is being installed.

    Unfortunetely, locking does not work reliably in all the scenarios on all the OSes, so multiple schemes must be relied on if attempting to be portable.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://9248]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2022-05-24 22:12 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.