News for hackers. Stuff that matters.
Re:Windows is the strangest, or hardest, operating system to... by csmpltn on Wednesday November 30, 2022 @12:49PM (#33804533)
> "But no new file handles can be opened. One by one as processes close file handles, they can no longer open new ones, until the last user has released the last handle."

Or, you know... the computer has to restart itself for some reason before the file was fully deleted, and you get a fragmented disk.

If I'm asking to delete a file, I want the file deleted. I want to know whether the deletion succeeded or not. I don't want it to secretly hide in a purgatory somewhere.

Is this the year of the Linux desktop already?

Re:Windows is the strangest, or hardest, operating system to... by Brian_K_White on Wednesday November 30, 2022 @01:18PM (#33805059)
This is a ridiculous comment.

If the kernel gets to shut doen gracefully, then there is no problem at all. The file handles are closed when the processed are killed and the filesystem is unmounted in a consistent state.

If the kernel does not get to shut down gracefully (crash or power loss) the filesystem is left no more or less inconsistent than any other time, and is cleaned up by fsck or by the journal if there is one. Either way the file is finished being deleted on reboot because no processes have open handles and the kenel and the fs know that those blocks are deleted. The last on-disk state of those inodes was that the blocks are not used by any normal file. The kernel knows not to continue holding them for no reason.

There is no such problem.