]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/console.cpp
Implement controls for file descriptor inheritance
[libs/core.git] / source / io / console.cpp
index e70f31d6a4aa21e8d8498559200423fc3a667f5c..a7417edcee8f186263c965363f4942d9b1f82768 100644 (file)
@@ -22,6 +22,12 @@ void Console::set_block(bool b)
        sys_set_blocking(handle, b);
 }
 
        sys_set_blocking(handle, b);
 }
 
+void Console::set_inherit(bool i)
+{
+       adjust_mode(mode, M_INHERIT, i);
+       sys_set_inherit(handle, i);
+}
+
 unsigned Console::do_write(const char *buf, unsigned len)
 {
        check_access(M_WRITE);
 unsigned Console::do_write(const char *buf, unsigned len)
 {
        check_access(M_WRITE);