version 1.123, 2003/03/28 20:40:52
|
version 1.126, 2003/05/06 21:36:42
|
Line 57 use LONCAPA::Configuration;
|
Line 57 use LONCAPA::Configuration;
|
|
|
use IO::Socket; |
use IO::Socket; |
use IO::File; |
use IO::File; |
use Apache::File; |
#use Apache::File; |
use Symbol; |
use Symbol; |
use POSIX; |
use POSIX; |
use Crypt::IDEA; |
use Crypt::IDEA; |
Line 375 sub reconlonc {
|
Line 375 sub reconlonc {
|
if (kill 0 => $loncpid) { |
if (kill 0 => $loncpid) { |
&logthis("lonc at pid $loncpid responding, sending USR1"); |
&logthis("lonc at pid $loncpid responding, sending USR1"); |
kill USR1 => $loncpid; |
kill USR1 => $loncpid; |
sleep 5; |
|
if (-e "$peerfile") { return; } |
|
&logthis("$peerfile still not there, give it another try"); |
|
sleep 10; |
|
if (-e "$peerfile") { return; } |
|
&logthis( |
|
"<font color=blue>WARNING: $peerfile still not there, giving up</font>"); |
|
} else { |
} else { |
&logthis( |
&logthis( |
"<font color=red>CRITICAL: " |
"<font color=red>CRITICAL: " |
Line 543 sub make_new_child {
|
Line 536 sub make_new_child {
|
} else { |
} else { |
# Child can *not* return from this subroutine. |
# Child can *not* return from this subroutine. |
$SIG{INT} = 'DEFAULT'; # make SIGINT kill us as it did before |
$SIG{INT} = 'DEFAULT'; # make SIGINT kill us as it did before |
|
$SIG{CHLD} = 'DEFAULT'; #make this default so that pwauth returns |
|
#don't get intercepted |
$SIG{USR1}= \&logstatus; |
$SIG{USR1}= \&logstatus; |
$SIG{ALRM}= \&timeout; |
$SIG{ALRM}= \&timeout; |
$lastlog='Forked '; |
$lastlog='Forked '; |
Line 1843 sub getchat {
|
Line 1838 sub getchat {
|
@entries=map { $_.':'.$hash{$_} } sort keys %hash; |
@entries=map { $_.':'.$hash{$_} } sort keys %hash; |
untie %hash; |
untie %hash; |
} |
} |
|
my @participants=(); |
$cutoff=time-60; |
$cutoff=time-60; |
if (tie(%hash,'GDBM_File',"$proname/nohist_inchatroom.db", |
if (tie(%hash,'GDBM_File',"$proname/nohist_inchatroom.db", |
&GDBM_READER(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
$hash{$uname.':'.$undom}=time; |
$hash{$uname.':'.$udom}=time; |
foreach (sort keys %hash) { |
foreach (sort keys %hash) { |
if ($hash{$_}>$cutoff) { |
if ($hash{$_}>$cutoff) { |
$entries[$#entries+1]='active_participant:'.$_; |
$participants[$#participants+1]='active_participant:'.$_; |
} |
} |
} |
} |
untie %hash; |
untie %hash; |
} |
} |
return @entries; |
return (@participants,@entries); |
} |
} |
|
|
sub chatadd { |
sub chatadd { |