skyeagle
skyeagle

Reputation: 3271

Error system:9: Bad file descriptor (BOOST::FileSystem)

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

Answers (1)

Duck
Duck

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

Related Questions