Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Strange Error

Strange Error
Thread Tools
Professional Poster
Join Date: Feb 2000
Location: Nashua NH, USA
Status: Offline
Reply With Quote
Oct 26, 2003, 06:09 PM
Working on a command line tool and i'm getting a confusing error.

Here's the code:
FileRec::move( const std::string dir ) const {
std::list<std::string>::const_iterator it = matches.begin();
if ( !rename( (dir+*it).c_str(), (target+*it).c_str() ) ) {
std::cout << "error moving file " << *it << " errno:" << errno << std::endl;

The errno return is 9 which is a Bad File Descriptor. Whats confusing me is that even though it errors it still renames the file(s).
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Privacy Policy
All times are GMT -4. The time now is 08:57 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,