mirror of https://github.com/aria2/aria2
2009-12-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added signal handler for SIGHUP to save .aria2 file when terminal is closed. The handler is the same one for SIGINT and SIGTERM. * src/MultiUrlRequestInfo.ccpull/1/head
parent
1c331e901a
commit
63c6a16d40
|
@ -1,3 +1,9 @@
|
||||||
|
2009-12-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Added signal handler for SIGHUP to save .aria2 file when terminal
|
||||||
|
is closed. The handler is the same one for SIGINT and SIGTERM.
|
||||||
|
* src/MultiUrlRequestInfo.cc
|
||||||
|
|
||||||
2009-12-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-12-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Defined method name in XmlRpcMethod subclasses.
|
Defined method name in XmlRpcMethod subclasses.
|
||||||
|
|
|
@ -161,6 +161,7 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute()
|
||||||
}
|
}
|
||||||
e->setStatCalc(_statCalc);
|
e->setStatCalc(_statCalc);
|
||||||
|
|
||||||
|
util::setGlobalSignalHandler(SIGHUP, handler, 0);
|
||||||
util::setGlobalSignalHandler(SIGINT, handler, 0);
|
util::setGlobalSignalHandler(SIGINT, handler, 0);
|
||||||
util::setGlobalSignalHandler(SIGTERM, handler, 0);
|
util::setGlobalSignalHandler(SIGTERM, handler, 0);
|
||||||
|
|
||||||
|
@ -190,6 +191,7 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute()
|
||||||
} catch(RecoverableException& e) {
|
} catch(RecoverableException& e) {
|
||||||
_logger->error(EX_EXCEPTION_CAUGHT, e);
|
_logger->error(EX_EXCEPTION_CAUGHT, e);
|
||||||
}
|
}
|
||||||
|
util::setGlobalSignalHandler(SIGHUP, SIG_DFL, 0);
|
||||||
util::setGlobalSignalHandler(SIGINT, SIG_DFL, 0);
|
util::setGlobalSignalHandler(SIGINT, SIG_DFL, 0);
|
||||||
util::setGlobalSignalHandler(SIGTERM, SIG_DFL, 0);
|
util::setGlobalSignalHandler(SIGTERM, SIG_DFL, 0);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|
Loading…
Reference in New Issue