In some sense this would even seem an advantage of Windows. (I know it's the fundamental reason for many hangs and freezes, but the idea that a file is a lockable resource doesn't seem that bad.)
I think files being locked is really intuitive, which greatly helps new users. Allowing files to be modified or deleted while they are open makes it really easy to shoot yourself in the foot. For example in the video of Linus switching to Linux he was uncompressing a file and tried to open it while it was still uncompressing, which failed since the file wasn't complete. He didn't understand why the file wasnt uncompressing correctly. That can't happen on Windows, since the file being uncompressed would be locked.
I think there should be a 'lockable mode', and for distributions oriented to new users the home directory should be mounted like that.
There IS 'lockable mode' since System V era. It is extensively used by package managers and similar stuff.
Deleting file does not actually deletes it from disk until last program closes it. And there are ways to open file such that changes to file will not be seen in program.
Yeah with "lockable mode" I mean locking by default instead of requiring every program to specifically call for locking.
It would probably break lots of software, but only using such mode for the users home (or maybe even specific Downloads/documents/desktop/etc folders within the home directory) could reduce the impact.
[Edit] wait I think there is whole fs locking mode on mounting, with the "mand" option, going to test it.
In some sense this would even seem an advantage of Windows. (I know it's the fundamental reason for many hangs and freezes, but the idea that a file is a lockable resource doesn't seem that bad.)
There is flock/fcntl for you. But locking is bad for performance too, especially in multithreaded enviroments.
Yes, the thing is - it's a choice.
Then there is cooperative locking for you. It becomes a choice.
I think files being locked is really intuitive, which greatly helps new users. Allowing files to be modified or deleted while they are open makes it really easy to shoot yourself in the foot. For example in the video of Linus switching to Linux he was uncompressing a file and tried to open it while it was still uncompressing, which failed since the file wasn't complete. He didn't understand why the file wasnt uncompressing correctly. That can't happen on Windows, since the file being uncompressed would be locked.
I think there should be a 'lockable mode', and for distributions oriented to new users the home directory should be mounted like that.
There IS 'lockable mode' since System V era. It is extensively used by package managers and similar stuff.
Deleting file does not actually deletes it from disk until last program closes it. And there are ways to open file such that changes to file will not be seen in program.
Yeah with "lockable mode" I mean locking by default instead of requiring every program to specifically call for locking.
It would probably break lots of software, but only using such mode for the users home (or maybe even specific Downloads/documents/desktop/etc folders within the home directory) could reduce the impact.
[Edit] wait I think there is whole fs locking mode on mounting, with the "mand" option, going to test it.