Explorar o código

Don't enter daemon mode if standalone is false

Tatsuhiro Tsujikawa %!s(int64=12) %!d(string=hai) anos
pai
achega
43895155e0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/option_processing.cc

+ 1 - 1
src/option_processing.cc

@@ -326,7 +326,7 @@ error_code::Value option_processing(Option& op, bool standalone,
       return error_code::UNKNOWN_ERROR;
     }
   }
-  if(op.getAsBool(PREF_DAEMON)) {
+  if(standalone && op.getAsBool(PREF_DAEMON)) {
     if(daemon(0, 0) < 0) {
       perror(MSG_DAEMON_FAILED);
       return error_code::UNKNOWN_ERROR;