X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fprocess.cpp;h=e19fd6b8f996fd78109880a2c0f59e9bee90b119;hb=0493c7ecdba517a14966be0bc6f233bd930cc648;hp=3bd03fa3816dbefc3faa71726fa1632c5537cdcd;hpb=41363aed34382386f915f17c1a961750b4fdcb14;p=libs%2Fcore.git diff --git a/source/core/windows/process.cpp b/source/core/windows/process.cpp index 3bd03fa..e19fd6b 100644 --- a/source/core/windows/process.cpp +++ b/source/core/windows/process.cpp @@ -2,6 +2,7 @@ #include #include #include +#include "except.h" #include "process.h" #include "process_private.h" @@ -43,6 +44,7 @@ Process::~Process() { CloseHandle(priv->info.hProcess); CloseHandle(priv->info.hThread); + delete priv; } void Process::platform_get_self_info(Private &priv) @@ -99,7 +101,7 @@ void Process::execute(const string &command, bool path_search, const Arguments & bool Process::wait(bool block) { if(!running) - throw logic_error("not running"); + throw invalid_state("not running"); DWORD ret = WaitForSingleObject(priv->info.hProcess, (block ? INFINITE : 0)); if(ret==WAIT_FAILED)