I have written a C++ binary that uses BOOST::FileSystem
When I run the binary, I get the following error message:
Error system:9: Bad file descriptor
What could be causing this, and how may I fix it?
PS: I am running on Linux Ubu开发者_如何学Cntu 10.x
It would help if you knew what operation you were doing when you got the error message. You could be trying to write to a descriptor that was opened for reading or visa versa. You may not have opened it at all or closed it and tried to write to it after the fact. Check the return codes of your operations and throw a perror() or something in there and determine where it is happening.
精彩评论