X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fprocess.h;h=0d7faa6c82f96c0e1eb413e582eab6c5a10ff4f4;hp=55b62cd450c534309d72dd7d39fa96f2cedbfb1c;hb=HEAD;hpb=c3e242c2629cbc9645258b30aaf07b7285d4372b diff --git a/source/core/process.h b/source/core/process.h index 55b62cd..ed997f8 100644 --- a/source/core/process.h +++ b/source/core/process.h @@ -5,6 +5,7 @@ #include #include #include +#include "mspcore_api.h" #include "noncopyable.h" namespace Msp { @@ -22,7 +23,7 @@ the process or capture its output, use an IO::Pipe. Redirections performed on the self object take effect immediately. It is recommended to perform such redirections directly on the Console objects. */ -class Process: private NonCopyable +class MSPCORE_API Process: private NonCopyable { public: typedef std::vector Arguments; @@ -30,20 +31,19 @@ public: private: struct Private; - Private *priv; + Private *priv = nullptr; FS::Path work_dir; - bool redirect; - IO::Base *cin; - IO::Base *cout; - IO::Base *cerr; - bool running; - bool finished; - unsigned exit_code; + bool redirect = false; + IO::Base *cin = nullptr; + IO::Base *cout = nullptr; + IO::Base *cerr = nullptr; + bool running = false; + bool finished = false; + unsigned exit_code = 0; static Process *_self; Process(const Private &); - void init(); public: Process(); ~Process();