#include <sigc++/sigc++.h>
#include <msp/core/mutex.h>
+#include <msp/core/noncopyable.h>
#include "handle.h"
#include "mode.h"
#include "poll.h"
/**
Common interface for all I/O objects.
*/
-class Base
+class Base: private NonCopyable
{
public:
/** RAII synchronization primitive. Prevents concurrent access to the
Mutex *mutex;
Base();
-private:
- Base(const Base &);
- Base &operator=(const Base &);
public:
virtual ~Base();
Blocking is enabled by default. */
virtual void set_block(bool) = 0;
+ /** Sets inheritance mode. When inheritance is enabled, the file descriptor
+ will persist through Process::execute.
+
+ Inheritance is disabled by default. */
+ virtual void set_inherit(bool) = 0;
+
/** Returns the current mode flags. */
Mode get_mode() const { return mode; }