3 ms·
The reason why you can replace executables on Unix is because unix loads the entire file before executing where as Windows does not need to do this, hence execu
by fleitz 15y ago
The reason why you can replace executables on Unix is because unix loads the entire file before executing where as Windows does not need to do this, hence executables are opened with out FILE_SHARE_DELETE which would allow you to delete the file while it's open on Windows. If you create a file and open it with FILE_SHARE_DELETE you can delete it while it's in use.
This has absolutely nothing to do with the underlying file system format and everything to do file semantics as documented in the Win32 API.
http://msdn.microsoft.com/en-us/library/aa363858(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/aa363858(v=vs.85).as...
- minimax 15y agoThere is no requirement for UNIX to "load the entire file before executing," nor does the deletion of files on disk have anything to do with whether or not a file is executable. Under UNIX, any file which has been opened will be accessible until it is closed, regardless of whether or not the file has been deleted (the number of hard links for the inode drops to zero, in UNIX parlance). For a more technical explanation see http://en.wikipedia.org/wiki/Inode http://en.wikipedia.org/wiki/Inode