[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.128, Wed Dec 16 20:57:35 2009 UTC revision 1.130, Mon Jun 14 14:36:03 2010 UTC
# Line 1104  Line 1104 
1104    
1105  =back  =back
1106    
1107    =back
1108    
1109  =cut  =cut
1110    
1111  sub ETracing {  sub ETracing {
# Line 1123  Line 1125 
1125      # Check for emergency tracing.      # Check for emergency tracing.
1126      my $tkey = EmergencyKey($parameter);      my $tkey = EmergencyKey($parameter);
1127      my $emergencyFile = EmergencyFileName($tkey);      my $emergencyFile = EmergencyFileName($tkey);
1128      if (-e $emergencyFile) {      if (-e $emergencyFile && (my $stat = stat($emergencyFile))) {
1129          # We have the file. Read in the data.          # We have the file. Read in the data.
1130          my @tracing = GetFile($emergencyFile);          my @tracing = GetFile($emergencyFile);
1131          # Pull off the time limit.          # Pull off the time limit.
# Line 1131  Line 1133 
1133          # Convert it to seconds.          # Convert it to seconds.
1134          $expire *= 3600;          $expire *= 3600;
1135          # Check the file data.          # Check the file data.
         my $stat = stat($emergencyFile);  
1136          my ($now) = gettimeofday;          my ($now) = gettimeofday;
1137          if ($now - $stat->mtime > $expire) {          if ($now - $stat->mtime <= $expire) {
             # Delete the expired file.  
             unlink $emergencyFile;  
         } else {  
1138              # Emergency tracing is on. Pull off the destination and              # Emergency tracing is on. Pull off the destination and
1139              # the trace level;              # the trace level;
1140              $dest = shift @tracing;              $dest = shift @tracing;

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.130

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3