2008/6/22 Raúl Alexis Betancor Santana <[EMAIL PROTECTED]>: > El Domingo, 22 de Junio de 2008 12:14, Konstantinos Arvanitis escribió: >> In the cw_closestream() function in corelib/file.c, it appears that >> the file is being moved before the underlying format close() function >> is called. This means that /bin/mv will attempt to move (and thus >> possible copy) a file that is not yet closed, possibly missing data >> and having a corrupt file. > > No, on Unix systems, there is no problem on moving an open file, "it just > works" >
I'm afraid it just works (tm) only when the file is moved into the same file system, thus the i-node number remains the same). However since the file may be moved across file systems (depending on the directories set in the configuration), /bin/mv may actually perform a copy, and then we WILL be asking for trouble. On the same function: If we know that the files will always be on the same filesystem (and thus need never be copied), using rename(2) avoid a whole fork/exec. _______________________________________________ Callweaver-dev mailing list [email protected] http://lists.callweaver.org/mailman/listinfo/callweaver-dev
