2008-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Quickly terminate commands when ctrl-c is pressed.
	* src/DownloadEngine.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-11-11 16:18:23 +00:00
parent ec2354f3a1
commit 8b3a21eb10
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Quickly terminate commands when ctrl-c is pressed.
* src/DownloadEngine.cc
2008-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2008-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Quickly terminate idle commands when download finished. Quickly terminate idle commands when download finished.

View File

@ -820,10 +820,14 @@ void DownloadEngine::afterEachIteration()
logger->notice(_("Shutdown sequence commencing... Press Ctrl-C again for emergency shutdown.")); logger->notice(_("Shutdown sequence commencing... Press Ctrl-C again for emergency shutdown."));
requestHalt(); requestHalt();
globalHaltRequested = 2; globalHaltRequested = 2;
setNoWait(true);
setRefreshInterval(0);
} else if(globalHaltRequested == 3) { } else if(globalHaltRequested == 3) {
logger->notice(_("Emergency shutdown sequence commencing...")); logger->notice(_("Emergency shutdown sequence commencing..."));
_requestGroupMan->forceHalt(); _requestGroupMan->forceHalt();
globalHaltRequested = 4; globalHaltRequested = 4;
setNoWait(true);
setRefreshInterval(0);
} }
} }