diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-08-15 18:11:36 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-08-20 13:57:04 -0400 |
commit | 4cec893ff09f7688c934c5b9a5792bf1c370974d (patch) | |
tree | 7a5209d4d9b106cbcf5bf5d890ba6ec489d3fcaa /src/mongo/util/exit_code.h | |
parent | 4f379f1c6689481b74d3672effdc7cd81a5f5d9a (diff) | |
download | mongo-4cec893ff09f7688c934c5b9a5792bf1c370974d.tar.gz |
SERVER-14925 Shutdown command should exit cleanly
Diffstat (limited to 'src/mongo/util/exit_code.h')
-rw-r--r-- | src/mongo/util/exit_code.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/util/exit_code.h b/src/mongo/util/exit_code.h index 30745d6c1e5..0d0617d92fa 100644 --- a/src/mongo/util/exit_code.h +++ b/src/mongo/util/exit_code.h @@ -32,7 +32,10 @@ #pragma once +#include <cstring> + namespace mongo { + class OperationContext; enum ExitCode { EXIT_CLEAN = 0 , @@ -55,4 +58,12 @@ namespace mongo { EXIT_TEST = 101 }; + /** + * Exit the current executable doing whatever cleanup is necessary. + * Defined differently in different executables. + * + * If txn is NULL, an OperationContext will be constructed if necessary for clean shutdown. + */ + void exitCleanly( ExitCode code, OperationContext* txn = NULL ); + } // namespace mongo |