mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
3177b0aa1c
commit
3636345a25
|
@ -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>
|
2009-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Small performance optimizations.
|
Small performance optimizations.
|
||||||
|
|
|
@ -191,7 +191,7 @@ void option_processing(Option& op, std::deque<std::string>& uris,
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DAEMON
|
#ifdef HAVE_DAEMON
|
||||||
if(op.getAsBool(PREF_DAEMON)) {
|
if(op.getAsBool(PREF_DAEMON)) {
|
||||||
if(daemon(1, 1) < 0) {
|
if(daemon(0, 0) < 0) {
|
||||||
perror(MSG_DAEMON_FAILED);
|
perror(MSG_DAEMON_FAILED);
|
||||||
exit(DownloadResult::UNKNOWN_ERROR);
|
exit(DownloadResult::UNKNOWN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue