anjakefala opened a new issue, #39385:
URL: https://github.com/apache/arrow/issues/39385

   ### Describe the enhancement requested
   
   `LocalFileSystem::Move` on non-Windows, calls `rename`: 
https://github.com/apache/arrow/blob/main/cpp/src/arrow/filesystem/localfs.cc#L585.
 It then does a check for -1, and prints the error.
   
   While the `rename` [system 
call](https://man7.org/linux/man-pages/man2/rename.2.html) and [Posix 
standard](https://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html)
 do specify that a return value of -1 is expected for error calls, the [C++ 
reference](https://en.cppreference.com/w/cpp/io/c/rename) specifies that a 
"non-zero" is returned upon error.
   
   I have two questions:
   1. Is the `rename` that is being called in `LocalFileSystem::Move` the one 
in `std::`? Should it be prefaced with `std::`?
   2. Should the check be changed to a non-zero check, as opposed to a -1 
check? Is there is a possibility that `std::rename` returns a different number 
other than -1 upon error?
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to