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
@@ -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.
@@ -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);