freeside/fs_selfservice/FS-SelfService freeside-selfservice-clientd,1.3.4.8,1.3.4.9
ivan
ivan at pouncequick.420.am
Wed Sep 15 01:45:09 PDT 2004
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory pouncequick:/tmp/cvs-serv29960
Modified Files:
Tag: FREESIDE_1_4_BRANCH
freeside-selfservice-clientd
Log Message:
obtain a new descriptor for the lock in kids, this should fix locking problems
Index: freeside-selfservice-clientd
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/freeside-selfservice-clientd,v
retrieving revision 1.3.4.8
retrieving revision 1.3.4.9
diff -u -d -r1.3.4.8 -r1.3.4.9
--- freeside-selfservice-clientd 14 Sep 2004 06:47:47 -0000 1.3.4.8
+++ freeside-selfservice-clientd 15 Sep 2004 08:45:07 -0000 1.3.4.9
@@ -43,6 +43,7 @@
warn "Creating $lock_file\n" if $Debug;
open(LOCKFILE,">$lock_file") or die "can't open $lock_file: $!";
+close LOCKFILE;
warn "Creating $socket\n" if $Debug;
my $uaddr = sockaddr_un($socket);
@@ -255,6 +256,9 @@
sub lock_write {
#broken on freebsd?
#flock(STDOUT, LOCK_EX) or die "FATAL: can't lock write stream: $!";
+
+ #open a new one for each kid to get a unique lock
+ open(LOCKFILE,">$lock_file") or die "can't open $lock_file: $!";
flock(LOCKFILE, LOCK_EX) or die "FATAL: can't lock $lock_file: $!";
}
More information about the freeside-commits
mailing list