Re: Unable to lock a file to stop sendmail writing to it
- From: Gunnar Hjalmarsson <noreply@xxxxxxxxx>
- Date: Thu, 20 Jul 2006 11:11:43 +0200
GarfGarf wrote:
I am trying to write a script that reads a mailbox that sendmail
updates, but I want to be able to lock the file, read the file, empty
the file and unlock the file again.
The problem I have is that locking doesn't seem to work.
I think your problem is merely a misconception with respect to the meaning of flock(). As stated in
perldoc -f flock
the nature of an flock() lock is advisory.
sendmail writes into the file while i'm writing and that
causes all sorts of problems.
That's probably because sendmail doesn't use flock on the mailboxes.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- Follow-Ups:
- Re: Unable to lock a file to stop sendmail writing to it
- From: GarfGarf
- Re: Unable to lock a file to stop sendmail writing to it
- References:
- Unable to lock a file to stop sendmail writing to it
- From: GarfGarf
- Unable to lock a file to stop sendmail writing to it
- Prev by Date: How to find out if a certain value is in a list?
- Next by Date: Re: Unable to lock a file to stop sendmail writing to it
- Previous by thread: Re: Unable to lock a file to stop sendmail writing to it
- Next by thread: Re: Unable to lock a file to stop sendmail writing to it
- Index(es):
Relevant Pages
|
|