Talk:Make a backup file: Difference between revisions

Line 8:
: libc may be used if it is linked to your language runtime or into the executable. what should be avoided is things like <code>exec</code> or <code>popen</code> which fork an external command, and even more so try not to use things like <code>system</code> which execute a shell to run the string you pass. the last one might make the task be a mere wrapper around any [[UNIX Shell]] entry.
: 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)
6,951

edits