Skip to main content
added 114 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

You cannot just"just" disable locking of executable/library files.

Doing so would break quite a few thingsHowever, because you might cause situations that the OS never expected.can (If the developers assumed that a situation is impossiblemove or rename in-use files, they might not have written any code to deal with itso make your build process move the existing DLL elsewhere and compile the new one in its place.)

 

It's very possible that they didn't add a hidden switch for it because various parts of the OS assume it'll always be on. For example, it could be that the filesystem code simply assumesexpects that there's always at least one link to a file (and therefore space can be freed immediately after deleting that last link) – so if you force it to delete an in-use file, it might result in various kinds of filesystem corruption, like two files using the same disk space.

( That said, The Old New Thing has once written that it actually wouldn't be hard to allow Linux-style file deletion in the WinNT kernel, and that they just haven't done so to avoid some compatibility issues. However, the point remains – you still don't know whether the OS has been prepared for that possibility or not.)


However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

You cannot just disable locking of executable/library files.

Doing so would break quite a few things, because you might cause situations that the OS never expected. (If the developers assumed that a situation is impossible, they might not have written any code to deal with it.)

For example, it could be that the filesystem code simply assumes that there's always at least one link to a file (and therefore space can be freed immediately after deleting that last link) – so if you force it to delete an in-use file, it might result in various kinds of filesystem corruption, like two files using the same disk space.

(The Old New Thing has once written that it actually wouldn't be hard to allow Linux-style file deletion in the WinNT kernel, and that they just haven't done so to avoid some compatibility issues. However, the point remains – you still don't know whether the OS has been prepared for that possibility or not.)


However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

You cannot "just" disable locking of executable/library files.

However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

 

It's very possible that they didn't add a hidden switch for it because various parts of the OS assume it'll always be on. For example, it could be that the filesystem code expects that there's always at least one link to a file (and therefore space can be freed immediately after deleting that last link) – so if you force it to delete an in-use file, it might result in various kinds of filesystem corruption, like two files using the same disk space.

That said, The Old New Thing has once written that it actually wouldn't be hard to allow Linux-style file deletion in the WinNT kernel, and that they just haven't done so to avoid some compatibility issues.

added 114 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

You cannot just disable locking of executable/library files.

Doing so would break quite a few things, because you might cause situations that the OS never expected. (If the developers assumed that a situation is impossible, they might not have written any code to deal with it.)

For example, locking allowsit could be that the filesystem code to assumesimply assumes that there's always at least one link to a file (and therefore space can be freed immediately after deleting that last link) so if you force the OSit to delete an in-use file, and the filesystem doesn't know what to do with it, that could might result in various kinds of filesystem corruption, like two files using the same disk space.

(The Old New Thing has once written that it actually wouldn't be hard to allow Linux-style file deletion in the WinNT kernel, and that they just haven't done so to avoid some compatibility issues. However, the point remains – you still don't know whether the OS has been prepared for that possibility or worsenot.)

 

However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

You cannot disable locking of executable/library files.

Doing so would break quite a few things, because you might cause situations that the OS never expected. For example, locking allows the filesystem code to assume that there's always at least one link to a file – if you force the OS to delete an in-use file, and the filesystem doesn't know what to do with it, that could result in filesystem corruption or worse.

However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

You cannot just disable locking of executable/library files.

Doing so would break quite a few things, because you might cause situations that the OS never expected. (If the developers assumed that a situation is impossible, they might not have written any code to deal with it.)

For example, it could be that the filesystem code simply assumes that there's always at least one link to a file (and therefore space can be freed immediately after deleting that last link) so if you force it to delete an in-use file, it might result in various kinds of filesystem corruption, like two files using the same disk space.

(The Old New Thing has once written that it actually wouldn't be hard to allow Linux-style file deletion in the WinNT kernel, and that they just haven't done so to avoid some compatibility issues. However, the point remains – you still don't know whether the OS has been prepared for that possibility or not.)

 

However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

added 114 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k

You cannot disable file locking of executable/library files. (It

Doing so would break quite a lotfew things, ifbecause you could.) Notemight cause situations that this is not the same as advisory lockingOS never expected. For example, which is just an extra feature – mandatory locking imposed by the OS might be there becauseallows the OS wouldn't know how to deal with a situation wherefilesystem code to assume that there's always at least one link to a file was deleted but is still in use... It's not locked for– if you force the sole purpose of annoyingOS to delete an in-use file, and the userfilesystem doesn't know what to do with it, that could result in filesystem corruption or worse.

However, you can move and renamemove or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

You cannot disable file locking. (It would break quite a lot, if you could.) Note that this is not the same as advisory locking, which is just an extra feature – mandatory locking imposed by the OS might be there because the OS wouldn't know how to deal with a situation where a file was deleted but is still in use... It's not locked for the sole purpose of annoying the user.

However, you can move and rename in-use files, so make your build process move the existing DLL elsewhere.

You cannot disable locking of executable/library files.

Doing so would break quite a few things, because you might cause situations that the OS never expected. For example, locking allows the filesystem code to assume that there's always at least one link to a file – if you force the OS to delete an in-use file, and the filesystem doesn't know what to do with it, that could result in filesystem corruption or worse.

However, you can move or rename in-use files, so make your build process move the existing DLL elsewhere and compile the new one in its place.

added 244 characters in body
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k
Loading
Source Link
grawity_u1686
  • 465.3k
  • 66
  • 977
  • 1.1k
Loading