summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-11 00:38:20 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-11 00:38:20 +0300
commitde579c6f0d298bc551addf02b001addea6b698ed (patch)
tree8db4cd39e35ea4af000f16c3865bed3c042b56b5 /src/main.cpp
parentb38844700debb737dad4090774ad0426a0ebcc02 (diff)
downloadplus-de579c6f0d298bc551addf02b001addea6b698ed.tar.gz
plus-de579c6f0d298bc551addf02b001addea6b698ed.tar.bz2
plus-de579c6f0d298bc551addf02b001addea6b698ed.tar.xz
plus-de579c6f0d298bc551addf02b001addea6b698ed.zip
Fix termination with using help and version command line switches.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d9c726a2c..8e9105b64 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -27,6 +27,7 @@
#include <getopt.h>
#include <iostream>
+#include <unistd.h>
#include "utils/gettext.h"
#ifdef ANDROID
@@ -238,12 +239,12 @@ int main(int argc, char *argv[])
if (options.printHelp)
{
printHelp();
- return 0;
+ _exit(0);
}
else if (options.printVersion)
{
printVersion();
- return 0;
+ _exit(0);
}
// Initialize PhysicsFS