What happens in Linux (or any other Unix) if a directory that has a mount point within it (a subdirectory) is renamed? Can you unmount using the new or old path of the mount point?
... and good morning!
Just wondering because on OpenBSD you no longer can unmount that drive if that happens, but there's a proposed patch that makes it possible.
@FaheemMitha That's the "locate the cursor" feature of iTerm on macOS.
@FaheemMitha Some filesystems only allows directories to grow and will never truncate them, no matter if their directory entires are deleted. This would be for performance reasons.
@FaheemMitha It would be the same on all Unix filesystems.
@MichaelHomer Yes. I thought it may be possible that the old path may have been stored somewhere as a sort of handle for the mount, to use with umount, but that is obviously not the case.
I have prodded a lot and I can't figure out exactly how it's tracking the rename
My two guesses are either that it intercepts every rename call to check, which seems like a performance nightmare, or that the kernel mount table is keyed on device/inode of parent directory and name
But I don't see a way to distinguish the two and I don't want to read the source
@Kusalananda I doubt that. Perl's pretty verbose when run with the use warnings (as I did). But no, @StephenKitt pointed me in the right direction. I can't reproduce this with newer versions, so it looks like it was just a bug that has since been fixed.
And thank you so much for figuring that out. I've been bashing my head against the wall since last night trying to figure it out. This was part of a very complex program which included sshing to another machine to run commands and it took ages to figure out that the problem was with the SQL.
Still, another user claimed he can reproduce with the same perl version. Whatever, I'm sorted :)
@terdon There are other things that might be happening too, e.g., maybe the buffer sizes are slightly different. There are both buffers in the pipe and in perl's read; if those absorb all of the zcat output, then it won't get SIGPIPE
You'd have to compare e.g., strace output beyond that.
@StephenKitt I don't know if I'd call SE "general appeal". Some of the sites are pretty niche.
TeX, for example. It's pretty specific.
I agree that the model, though at first sight it looks very simple-minded and even a bit childish (points and badges) does work well, and it's effective at keeping out spammers, which is a huge problem in general.