IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2010, 11:24:32 AM (16 years ago)
Author:
Paul Price
Message:

Reorganising the death to ensure files are closed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSub.c

    r27061 r27077  
    6363
    6464 die:
    65     psTrace("ppSub", 1, "Finished at %f sec\n", psTimerMark("ppSub"));
    66     psTimerStop();
    67 
    6865    if (data && data->stats && data->statsFile) {
    6966        psString stats = psMetadataConfigFormat(data->stats); // Statistics to output
     
    9087        psFree(data);
    9188    }
    92 
    93     pmVisualClose(); //close plot windows, if -visual is set
    94     pmModelClassCleanup();
    95     pmConfigDone();
    96     psLibFinalize();
    9789
    9890    psExit exitValue = PS_EXIT_SUCCESS;        // Exit value for program
     
    136128    }
    137129
     130    if (config && !ppSubFilesIterateUp(config, PPSUB_FILES_ALL)) {
     131        psErrorStackPrint(stderr, "Unable to close files.");
     132    }
     133
     134    psTrace("ppSub", 1, "Finished at %f sec\n", psTimerMark("ppSub"));
     135    psTimerStop();
     136
     137    pmVisualClose(); //close plot windows, if -visual is set
     138    pmModelClassCleanup();
     139    pmConfigDone();
     140    psLibFinalize();
     141
    138142    exit(exitValue);
    139143}
Note: See TracChangeset for help on using the changeset viewer.