On Mon, Oct 5, 2015 at 1:58 PM, Jürgen Hestermann <juergen.hesterm...@gmx.de> wrote: > > > Am 2015-10-04 um 19:11 schrieb mic...@gmail.com: >>> >>> But that makes no sense to me. If the OS is designed to potentially >>> remove >>> running programs (or parts of it) from memory it cannot allow overwriting >>> the file on disk in any case. When it does so, it cannot remove parts >>> from >>> memory because it may not be available on disk anymore. So it must >>> disallow >>> the disk change from the beginning, otherwise it may not be able to >>> remove >>> anything. >>> >> >> http://askubuntu.com/questions/44339/how-does-updating-running-application-binaries-during-an-upgrade-work >> >> >> http://unix.stackexchange.com/questions/49299/what-is-linux-doing-differently-that-allows-me-to-remove-replace-files-where-win >> >> >> http://superuser.com/questions/251129/moving-a-file-while-its-in-use-how-does-it-work >> > > In these links I didn't find any explanation that tell me if (and if yes, > why) it *sometimes* does not work.
AFAIK (and the articles seem to confirm that) no "part is replaced" and no parts are (necessarily) held in memory: a new file is created on disk and the old file is kept on disk, tough not mapped the file name, until all processes that hold "pointers" to the old file are finished. IIRC NTFS works like that too and Windows actively creates locks to files in use to avoid deletion. -Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal