Exit on --version and --help options
authorAlexander Soldatov <soldatov.a@samsung.com>
Tue, 19 Oct 2021 15:09:57 +0000 (18:09 +0300)
committer이형주/Common Platform Lab(SR)/Principal Engineer/삼성전자 <leee.lee@samsung.com>
Mon, 25 Oct 2021 01:46:27 +0000 (10:46 +0900)
src/main.cpp

index 830bf4002d0b6c9e011ab2aec95b64f0aedacfd6..358d7b53951e27ea41ff621c8416070924841b72 100644 (file)
@@ -259,13 +259,13 @@ int main(int argc, char* argv[])
         { "--help", [&](int& i){
 
             print_help();
-            return EXIT_SUCCESS;
+            exit(EXIT_SUCCESS);
 
         } },
         { "--buildinfo", [&](int& i){
 
             print_buildinfo();
-            return EXIT_SUCCESS;
+            exit(EXIT_SUCCESS);
 
         } },
         { "--version", [&](int& i){
@@ -275,7 +275,7 @@ int main(int argc, char* argv[])
             fprintf(stdout, "\nCopyright (c) 2020 Samsung Electronics Co., LTD\n");
             fprintf(stdout, "Distributed under the MIT License.\n");
             fprintf(stdout, "See the LICENSE file in the project root for more information.\n");
-            return EXIT_SUCCESS;
+            exit(EXIT_SUCCESS);
 
         } },
         { "--log", [&](int& i){