id summary reporter owner description type status milestone component version severity resolution keywords cc 579 boost.iostreams file_descriptor and sharing nobody Jonathan Turkanis "{{{ Hi! I have couple of questions about the behavior of boost::iostreams::file_descriptor. First, I've noticed that it always opens files with exclusive access. That is, it calls CreateFileA with a dwShareMode of 0, which means that ""the object cannot be shared and cannot be opened again until the handle is closed"". Is this by design? Wouldn't it be reasonable to use a share mode of FILE_SHARE_READ when opening a file only for reading? Second, the function file_descriptor::open has a third parameter 'base', which appears to be extra open mode bits that are always on, in addition to those in the second parameter to stream::open. What is the purpose of this? Since there is a stream::open function with three parameters I can specify these extra bits as well when opening the file, in order to actually get the file opened only for reading, but I worry that this will somehow violate the design of the file_descriptor class. I've modified my copy of file_descriptor::open to use a share mode of FILE_SHARE_READ when opening a file only for reading and am now calling stream::open with three arguments in order to make this happen. Is this safe? It appears to work in the very limited cases I've tried so far. Yours, Gunnar Blomberg (Gunnar.Blomberg@iar.se) PS. Thanks for an excellent library! DS. }}}" Support Requests closed iostreams None Problem fixed