X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprocess.h;h=f21ecb337d76d5c8718b056478597968f04c0f9a;hb=5763dd6e8089c97699cbcbd221afb7fe1841bcdd;hp=5413587cd54f164f38714926a53c445308a02461;hpb=ea60f3548d4769c356b796cb27cd690cdfe4b6d9;p=libs%2Fcore.git diff --git a/source/core/process.h b/source/core/process.h index 5413587..f21ecb3 100644 --- a/source/core/process.h +++ b/source/core/process.h @@ -5,6 +5,7 @@ #include #include #include +#include "noncopyable.h" namespace Msp { @@ -21,7 +22,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 +class Process: private NonCopyable { public: typedef std::vector Arguments; @@ -29,20 +30,19 @@ public: private: struct Private; - Private *priv; + Private *priv = 0; 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 = 0; + IO::Base *cout = 0; + IO::Base *cerr = 0; + bool running = false; + bool finished = false; + unsigned exit_code = 0; static Process *_self; Process(const Private &); - void init(); public: Process(); ~Process();