Jump to content

Talk:Make a backup file: Difference between revisions

Line 9:
: the reason for avoiding exec is that in some environments executing other commands has its own set of problems. path issues, security, or even simply availability, and also portability. (a solution that executes <code>mv</code> is going to be harder to port to windows than one that uses some libc <code>rename</code> function)--[[User:EMBee|eMBee]] 03:11, 10 November 2011 (UTC)
:: You did not address dynamic loading at all (dlopen, ...). Also, you did not give enough detail for me to decide what to do about the case where file rename is implemented in utility which comes with the language and which uses <code>mv</code> on unix and <code>MoveFileW</code> from <code>kernel32</code> on windows. --[[User:Rdm|Rdm]] 14:31, 10 November 2011 (UTC)
::: i think <code>dlopen</code> is ok, i am not sure though, one question i am interested in is: can i deploy a program without relying on dependencies that i can not control? what if a user wants to run the program in a chroot or jail environment where <code>mv</code> might be missing. <code>dlopen</code> would be ok here only if the library to be opened somehow comes with the language, like it is a standard dependency of the language (as opposed to a dependency of just this task). this partly answers the case where the language implements rename using <code>mv</code> because in such a case <code>mv</code> would also be a standard dependency of the language. although i still would like to prefer a version that doesn't rely on external tools and processes.
::: in any case, if you can not avoid running an external process or if you dlopen a 3rd party library then please point this out in the description.--[[User:EMBee|eMBee]] 17:07, 10 November 2011 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.