#include <msp/core/systemerror.h>
#include <msp/io/handle_private.h>
#include <msp/strings/utils.h>
+#include "except.h"
#include "process.h"
#include "process_private.h"
{
CloseHandle(priv->info.hProcess);
CloseHandle(priv->info.hThread);
+ delete priv;
}
void Process::platform_get_self_info(Private &priv)
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)