version 1.548, 2004/09/27 19:00:16
|
version 1.549, 2004/10/05 11:24:34
|
Line 116 sub logperm {
|
Line 116 sub logperm {
|
sub subreply { |
sub subreply { |
my ($cmd,$server)=@_; |
my ($cmd,$server)=@_; |
my $peerfile="$perlvar{'lonSockDir'}/$server"; |
my $peerfile="$perlvar{'lonSockDir'}/$server"; |
|
# |
|
# With loncnew process trimming, there's a timing hole between lonc server |
|
# process exit and the master server picking up the listen on the AF_UNIX |
|
# socket. In that time interval, a lock file will exist: |
|
|
|
my $lockfile=$peerfile.".lock"; |
|
while (-e $lockfile) { # Need to wait for the lockfile to disappear. |
|
sleep(1); |
|
} |
|
# At this point, either a loncnew parent is listening or an old lonc |
|
# or loncnew child is listening so we can connect. |
|
# |
my $client=IO::Socket::UNIX->new(Peer =>"$peerfile", |
my $client=IO::Socket::UNIX->new(Peer =>"$peerfile", |
Type => SOCK_STREAM, |
Type => SOCK_STREAM, |
Timeout => 10) |
Timeout => 10) |