X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fwindows%2Fprocess.cpp;h=0eae33bdab07eb4169d441ff865ac23aadd28b30;hb=3ba20e3ddde250a78ab2410012551eb60304f766;hp=3bd03fa3816dbefc3faa71726fa1632c5537cdcd;hpb=41363aed34382386f915f17c1a961750b4fdcb14;p=libs%2Fcore.git diff --git a/source/core/windows/process.cpp b/source/core/windows/process.cpp index 3bd03fa..0eae33b 100644 --- a/source/core/windows/process.cpp +++ b/source/core/windows/process.cpp @@ -1,7 +1,8 @@ -#include +#include "winapi.h" #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)