Просмотр исходного кода

2009-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Call daemon() with arguments(0,0), which means daemon() changes
	current working directory to / and redirects stdin, stdout and
	stderr to /dev/null.
	* src/option_processing.cc
Tatsuhiro Tsujikawa 16 лет назад
Родитель
Сommit
3636345a25
2 измененных файлов с 8 добавлено и 1 удалено
  1. 7 0
      ChangeLog
  2. 1 1
      src/option_processing.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2009-06-21  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Call daemon() with arguments(0,0), which means daemon() changes
+	current working directory to / and redirects stdin, stdout and
+	stderr to /dev/null.
+	* src/option_processing.cc
+
 2009-06-21  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Small performance optimizations.

+ 1 - 1
src/option_processing.cc

@@ -191,7 +191,7 @@ void option_processing(Option& op, std::deque<std::string>& uris,
   }
 #ifdef HAVE_DAEMON
   if(op.getAsBool(PREF_DAEMON)) {
-    if(daemon(1, 1) < 0) {
+    if(daemon(0, 0) < 0) {
       perror(MSG_DAEMON_FAILED);
       exit(DownloadResult::UNKNOWN_ERROR);
     }