Ignore:
Timestamp:
2001-10-02T22:36:37+12:00 (23 years ago)
Author:
sjboddie
Message:

Tidied up the collector's error handling. Hopefully the situation where the
status page loops continuously after an error will now be rare (it can
still happen if perl or one of the third party converters hangs though)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/build

    r2566 r2774  
    464464}
    465465
    466 # creates a file called $outfile.final (should only be called if -out option
    467 # is used and isn't STDERR or STDOUT) and writes an output code to it.
     466# creates a file called $outfile.final and writes an output code to it.
    468467# An output code of 0 specifies that there was no error
    469468sub final_out {
    470469    my ($exit_code) = @_;
    471470
    472     if (open (FINAL, ">$outfile.final")) {
    473     print FINAL $exit_code;
    474     close FINAL;
     471    if ($use_out && (!-e "$outfile.final")) {
     472
     473    if (open (FINAL, ">$outfile.final")) {
     474        print FINAL $exit_code;
     475        close FINAL;
     476    }
    475477    }
    476478}
     
    578580    }
    579581
     582    # this will produce a .final file if one doesn't exist yet - that
     583    # should only happen if there's been an error somewhere in the perl
     584    # code
     585    &final_out(7);
     586
    580587    sub recursive_chmod {
    581588    my ($dir) = @_;
Note: See TracChangeset for help on using the changeset viewer.