简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM