X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Ffile.cpp;fp=source%2Fio%2Ffile.cpp;h=74b9f9fde19e49983e35098ea06c0c6c80bcfd0e;hp=ab957c97f1e2472a5d007b86e8ace3ea9493ec59;hb=ea8bf8f588310b0d7fd3297d74907602705bba1d;hpb=beb12b1ec35ca49512b00668b23caaead1ce8671 diff --git a/source/io/file.cpp b/source/io/file.cpp index ab957c9..74b9f9f 100644 --- a/source/io/file.cpp +++ b/source/io/file.cpp @@ -32,6 +32,12 @@ void File::set_block(bool b) sys_set_blocking(handle, b); } +void File::set_inherit(bool i) +{ + adjust_mode(mode, M_INHERIT, i); + sys_set_inherit(handle, i); +} + unsigned File::do_write(const char *buf, unsigned size) { check_access(M_WRITE); @@ -96,6 +102,11 @@ void BufferedFile::set_block(bool b) file.set_block(b); } +void BufferedFile::set_inherit(bool) +{ + throw logic_error("BufferedFile::set_inherit"); +} + unsigned BufferedFile::do_write(const char *buf, unsigned size) { unsigned ret = buffer.write(buf, size);