Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 12236
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: rt.cpan.org [...] plan9.de
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: file-appendMessages very unsafem should be better documented
Mail::Box::File hints that "Appending messages to a file based folder which is not opened is a little risky. In practice, this is often done without locking the folder.". It would be nice if this were stated more prominently in, for example, Mail::Box::Mbox. It's particulalry bad as the default of "NONE" for lock_type is not documented (and one could assume from new() that similar defaults would apply, but this is not the case). Also, appendMessages is less safe than it could, as it opens with "a" instead of with O_APPEND, which is way safer (O_APPEND fails on NFS, while "a" fails in local collisions). It's still unsafe as the mail might not be written in a single write call, but it would be less so.
[guest - Sun Apr 10 20:52:41 2005]: Show quoted text
> Mail::Box::File hints that "Appending messages to a file based folder > which is not opened is a little risky. In practice, this is often > done without locking the folder.". > > It would be nice if this were stated more prominently in, for example, > Mail::Box::Mbox. It's particulalry bad as the default of "NONE" for > lock_type is not documented (and one could assume from new() that > similar defaults would apply, but this is not the case).
I will include that info in de method description. This is however how I understand my e-mail client to work: it checks the folder growth every once in a while, without keeping a lock... see $folder->update Show quoted text
> Also, appendMessages is less safe than it could, as it opens with "a" > instead of with O_APPEND, which is way safer (O_APPEND fails on > NFS, while "a" fails in local collisions). It's still unsafe as the > mail might not be written in a single write call, but it would be > less so.
Huh... more info about that? 'a' is buffered IO and O_APPEND isn't, but for the filesystem point of few both should work the samen. Buffered IO is faster when you print various length records (like header fields). Can you point me to a place where you got this from???