X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Funix%2Fprocess.cpp;h=ee0a36d3b783ea30383470f6c411f3a007c54bed;hb=HEAD;hp=7370b70803f94bff6c24c57a3adb453f5ea6682a;hpb=41363aed34382386f915f17c1a961750b4fdcb14;p=libs%2Fcore.git diff --git a/source/core/unix/process.cpp b/source/core/unix/process.cpp index 7370b70..ee0a36d 100644 --- a/source/core/unix/process.cpp +++ b/source/core/unix/process.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "except.h" #include "process.h" #include "process_private.h" @@ -12,7 +13,9 @@ using namespace std; namespace Msp { Process::~Process() -{ } +{ + delete priv; +} void Process::platform_get_self_info(Private &priv) { @@ -70,7 +73,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"); int status; int pid = waitpid(priv->info.pid, &status, (block ? 0 : WNOHANG));