Reputation: 3271
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 Ubuntu 10.x
Upvotes: 1
Views: 1884
Reputation: 27572
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.
Upvotes: 2