Changeset 27108
- Timestamp:
- Feb 26, 2010, 3:17:54 PM (16 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStack.c
r27107 r27108 58 58 // Common code for the death. 59 59 { 60 psExit exitValue = ppStackExitCode( ); // Exit code60 psExit exitValue = ppStackExitCode(PS_EXIT_SUCCESS); // Exit code 61 61 62 62 // Ensure everything closes … … 67 67 ppStackFileActivation(config, PPSTACK_FILES_PHOT, true); 68 68 if (!ppStackFilesIterateUp(config)) { 69 psErrorStackPrint(stderr, "Unable to close files."); 70 if (exitValue == PS_EXIT_SUCCESS) { 71 exitValue = ppStackExitCode(); 72 } 69 psError(psErrorCodeLast(), false, "Unable to close files."); 70 exitValue = ppStackExitCode(exitValue); 73 71 } 74 72 } … … 78 76 psString dump = psMetadataLookupStr(&mdok, config->arguments, "DUMP_CONFIG"); // File for config 79 77 if (dump && !pmConfigDump(config, dump)) { 80 psErrorStackPrint(stderr, "Unable to dump configuration."); 81 if (exitValue == PS_EXIT_SUCCESS) { 82 exitValue = ppStackExitCode(); 83 } 78 psError(psErrorCodeLast(), false, "Unable to dump configuration."); 79 exitValue = ppStackExitCode(exitValue); 84 80 } 85 81 … … 93 89 pmVisualClose(); 94 90 91 exitValue = ppStackExitCode(exitValue); 95 92 exit(exitValue); 96 93 } -
trunk/ppStack/src/ppStack.h
r27107 r27108 170 170 171 171 /// Return an appropriate exit code based on the error code 172 psExit ppStackExitCode( void);172 psExit ppStackExitCode(psExit exitValue); 173 173 174 174 #endif -
trunk/ppStack/src/ppStackFinish.c
r27107 r27108 94 94 95 95 96 psExit ppStackExitCode( void)96 psExit ppStackExitCode(psExit exitValue) 97 97 { 98 psExit exitValue = PS_EXIT_SUCCESS; // Exit code to return 98 if (exitValue != PS_EXIT_SUCCESS) { 99 return exitValue; 100 } 101 99 102 psErrorCode errorCode = psErrorCodeLast(); // Error code 100 103 if (errorCode != PS_ERR_NONE) {
Note:
See TracChangeset
for help on using the changeset viewer.
