X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbase.h;h=a6a8827c6d4c28ee981806c4284af063b96de8dd;hp=c58be90f7ebd039504e261105e53dc7329a1ac13;hb=ea8bf8f588310b0d7fd3297d74907602705bba1d;hpb=169ece8b190040c4b61d68122c4ead1ba266cf79 diff --git a/source/io/base.h b/source/io/base.h index c58be90..a6a8827 100644 --- a/source/io/base.h +++ b/source/io/base.h @@ -12,9 +12,6 @@ namespace IO { /** Common interface for all I/O objects. - -A derived class must call set_events(P_NONE) before it is destroyed to avoid -leaving stale pointers in an EventDispatcher. */ class Base { @@ -60,7 +57,13 @@ public: was done. Blocking is enabled by default. */ - virtual void set_block(bool) { } + 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; } @@ -108,7 +111,7 @@ public: /** Returns the system-level handle for the object. Used by Console to perform redirections. */ - virtual const Handle &get_handle(Mode); + virtual const Handle &get_handle(Mode) = 0; }; } // namespace IO