5 ms·
As a user, every interaction I have had with Windows' file locking semantics have not made me think it was 'sane'
by ubercow13 7y ago
As a user, every interaction I have had with Windows' file locking semantics have not made me think it was 'sane'
- pjmlp 7y agoFirst, there are more OSes out there besides Windows and UNIX. Examples of insane behavior of UNIX's lack of locking: - A process can get its file corrupted because flock() is cooperative, so there isn't any enforcement that even if file locking is used, it actually works. Hence the dance with temporary lockfiles as workaround. - A process can happily store important information into a file just to have it deleted under its feet after the usage count of the inode goes to zero, and good luck bringing the data back to life without forensics tools. Quite sane indeed.
- ubercow13 7y agoYes, but as a user rather than developer, I have never had a problem with it in practice, unlike Windows. And it is honestly much more convenient (as a user) to be able to manipulate open documents on the filesystem if you can keep in mind how the semantics work.
- pjmlp 7y agoThe user of a corrupted document won't be very happy when it happens.
- 7786655 7y agoI've been using Linux for years and have encountered this problem exactly zero times.
- pjmlp 7y agoYeah, because you validate the writes across all files on the system. Many people also swear that only bad programmers write C programs with memory corruption bugs.
- ubercow13 7y agoMaybe in theory, but it has never actually happened to me. I don't see much *nix user/sysadmin advice around the internet about how to avoid all those inevitably corrupted files, but there is plenty of evidence that Windows' strict locking causes real users real annoyance.
- pjmlp 7y agoIn theory only bad programmers write C code that corrupts memory, and yet it happens even in projects with top coders and multiple levels of code reviews. Files are just memory in a different storage device.
- ubercow13 7y ago>In theory only bad programmers write C code that corrupts memory, and yet it happens even in projects with top coders and multiple levels of code reviews. In theory only bad programmers write code with bugs related to Windows file locking, and yet... well just check the OP I guess