Re: mbox ownership
'Mark Overmeer' <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* andre deblire ([email protected]) [040416 16:56]: > I use the default locking on Linux (RedHat 8). Is it safe ? > > I didn't find a thread about this topic in the mailing list (searching > Kees Dekker). Where can I find more information about safe > locking/platform ? I always hope someone else answers the questions, but this doesn't happen that often :( Kees is actively digging, so we do not communicate via the list. Default locking is DotLock, which is what most systems use. When you use the REPLACE 'write_policy' (the dedault), your owner will change, and it will not protect you. With INPLACE, it will (and the owner will not change, it is faster, but may cause problems when the system crashes during a folder update) > > -----Original Message----- > > * andre deblire ([email protected]) [040413 00:05]: > > > I found a workaround not extensively tested, but it seems to work : > > > ######## > > > $Folder->write(); > > > chown(...); > > > $Folder->close(); > > > ######## > > > > > > Do you see a problem with this ? > > > > When you use proper locking, this may work. However, on some > > platforms and with some locking methods, the folder lock is lost > > after a $folder->write. In those cases (which Kees Dekker is > > trying to solve) your work-around isn't 100% safe. -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net