diff options
Diffstat (limited to 'src/DownloadEngineFactory.cc')
| -rw-r--r-- | src/DownloadEngineFactory.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc index 5bd8d53d..9fd1db42 100644 --- a/src/DownloadEngineFactory.cc +++ b/src/DownloadEngineFactory.cc @@ -52,6 +52,7 @@ #include "AutoSaveCommand.h" #include "HaveEraseCommand.h" #include "TimedHaltCommand.h" +#include "WatchProcessCommand.h" #include "DownloadResult.h" #include "ServerStatMan.h" #include "a2io.h" @@ -163,6 +164,10 @@ DownloadEngineFactory::newDownloadEngine stopSec)); } } + if(op->defined(PREF_STOP_WITH_PROCESS)) { + unsigned int pid = op->getAsInt(PREF_STOP_WITH_PROCESS); + e->addRoutineCommand(new WatchProcessCommand(e->newCUID(), e.get(), pid)); + } if(op->getAsBool(PREF_ENABLE_RPC)) { bool ok = false; static int families[] = { AF_INET, AF_INET6 }; |
