[Dirvish] patch for dirvish, long backups would overlap

Loren M. Lang lorenl at alzatex.com
Tue Jul 5 19:45:01 UTC 2011


On 1/5/2011 1:15 AM, John Altstadt wrote:
> Thanks Eric, but I will leave that for someone with better perl-foo 
> skills than me. Perhaps it can be cleaned up for an official patch.

Has this patch been applied in some form yet?  If not, I can take a look 
at it as I have a decent understanding of file locking.

Also, I can't seem to find the URL for the subversion server for 
Dirvish, just the viewvc viewer of it.  Where's the public access to 
subversion located?

>
> On Tue, Jan 4, 2011 at 2:42 AM, Eric Searcy <emsearcy at gmail.com 
> <mailto:emsearcy at gmail.com>> wrote:
>
>     On Jan 2, 2011, at 2:13 PM, John Altstadt wrote:
>
>     [...]
>     >
>     > +     if (! -f $lock_file)
>     > +     {
>     > +         open(LOCK, "+>", $lock_file) or seppuku 150, "cannot
>     create $lock_file";
>     > +
>     [...]
>     >
>     > I felt it was about time I contributed something back to the
>     community again. Please feel free to use this patch or criticize
>     it as you see fit. It works for me.
>
>     Good idea.  And for a suggestion: you should use a exclusive file
>     lock (non-blocking to get the same behavior where you don't wait)
>     to avoid the race condition that exists in the above code.
>
>     http://perldoc.perl.org/perlopentut.html#File-Locking
>
>     Eric
>     _______________________________________________
>     Dirvish mailing list
>     Dirvish at dirvish.org <mailto:Dirvish at dirvish.org>
>     http://www.dirvish.org/mailman/listinfo/dirvish
>
>
>
>
> _______________________________________________
> Dirvish mailing list
> Dirvish at dirvish.org
> http://www.dirvish.org/mailman/listinfo/dirvish


-- 
Loren M. Lang
lorenl at alzatex.com
http://www.alzatex.com/


Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654 DE5B

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dirvish.org/pipermail/dirvish/attachments/20110705/3775b1b9/attachment.html 


More information about the Dirvish mailing list