Retrieving file descriptor from a std::fstream

Viewed 28569

Possible Duplicate:
Getting a FILE* from a std::fstream

I am working on Linux and file descriptors are the main model in this OS.

I was wondering whether is there any library or any way to retrieve the native Linux file descriptor starting from a C++ std::fstream.

I thought about boost::iostream since there is a class called file_descriptor but I understood that its purpose is different from the one I want to achieve.

Do you know some way to do that?

4 Answers
Related