Fixed some (Linux kernel?) compatibility problem of flock(1) of a directory. master
authorlace <>
Tue, 6 Jun 2006 08:07:08 +0000 (08:07 +0000)
committerlace <>
Tue, 6 Jun 2006 08:07:08 +0000 (08:07 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index d24bf28..ffe48c5 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -940,7 +940,9 @@ my($cmd)=@_;
        # FIXME: &alarm, --timeout is now infinite.
        # FIXME: Try to remove bash(1).
        # FIXME: Use: @PATH_FLOCK@
-       my @argv=('flock',dir_top_abs_disk(),'bash','-c',$cmd.' >&2');
+       # Do not: dir_top_abs_disk(),
+       # to prevent: flock: cannot open lock file /home/lace/www/www.jankratochvil.net: Is a directory
+       my @argv=('flock',dir_top_abs_disk()."/WebConfig.pm",'bash','-c',$cmd.' >&2');
        print STDERR join(" ","SPAWN:",@argv)."\n";
        system @argv;
 }