8 ms·
So, you smug Linux guys think it can't happen to you? Well, before you get off my lawn, let me tell you a story... Early versions of FrameMaker kept all resour
by drfuchs 9y ago
So, you smug Linux guys think it can't happen to you? Well, before you get off my lawn, let me tell you a story...
Early versions of FrameMaker kept all resource files (internationalized strings, dialog box layouts, etc.) in the two subdirectories .../FrameMaker/Resources/{Unix,Core} (the first one for the Unix platform-specific resources, and the second for the cross-platform ones also used by the Mac and Windows ports). We had hundreds of happy customers, and had been shipping for 4 years or more.
But one new customer was calling in a panic. They'd installed the product, and it would work fine, but the next morning, it wouldn't even start up, and they had to re-install it. And then it would break again over night. After much pulling of hair and gnashing of teeth, it turns out that due to some other flakey product they were running, they had previously instituted a nightly cron job that ran around removing any core files it could find (since they were large and wasteful of precious disk space back in the day). And the knucklehead who wrote the script had it do a case-insensitive match on "core" and had it essentially do a "rm -rf" even though no true core file could be a directory. So, every night, our Core resource directory was blown away.
We actually had to change the product, as this was a big, important customer, and they outright refused to fix their cron script. Never had this problem on the Windows and Mac ports.
- hossbeast 9y agoHow is this specific to Linux?
- drfuchs 9y agoOk, "unix-derivative" if you prefer. FWIW, it actually happened on SunOS or maybe HP-UX, and it was before Linux existed.
- flukus 9y agoBut it could have just as easily been a windows batch file, it's not related to the OS at all.
- kieranelby 9y agoWell, apart from the fact that UNIX-like systems have traditionally dumped core files in programs' working directories if they crash, so needing a script to clean them up. Linux still does, though many distros set ulimit or /proc/sys/kernel/core_pattern to disable it.
- SolarNet 9y agoWindows does this too, except it hides them in it's system folders, it even comes with a built in clean-up script you can run. Not a problem that is worse on *nix.
- pjc50 9y agoI'm reminded of when I discovered on a production system that "killall" is very different on Solaris to Linux.
- technofiend 9y agoSeriously? They couldn't be bothered to add -type f? Depending on context I can be a big customer but I'd be embarrassed to ask you to work around something like that. My odd-ball only on Wall Street security system I can't do much about but sheesh that's like a couple of minutes to test. They probably couldn't push it everywhere easily?
- jlgaddis 9y agoWhile an interesting story, this is more of a self-imposed customer screw-up and not quite the same thing, IMO.
- drfuchs 9y agoA more direct (though fictional) illustration that Unix also has reserved file names that you'd better avoid: "I was writing a novel about digging to the center of the Earth, entitled "core". One day I was running some program that crashed, and my novel turned into a bunch of binary gibberish." Or how about: "My video of my kid's first at-bat, in a file I named a.out, got mysteriously clobbered when I took my first programming class." These are more insidious than the MSDOS examples, which at least fail right away.
- TheDong 9y agoThey are less insidious by far. You're really reaching for threads here. The first, `core`, isn't relevant. `/proc/sys/kernel/core_pattern` configures that value, and by default it's named "core.$PID" nowadays. That's far better than windows' wart since it's configurable, disableable, etc. Your second example is even more contrived. If you run a tool which writes files, of course it can overwrite files. I don't complain that in windows when I type "copy foo bar" my "bar" file is overwritten by "foo". In the same way, someone who voluntarily runs "gcc x.c" or "cat > foo" should not be surprised when "a.out" and "foo" respectively are overwritten. There's a massive difference between an unconfigurable gotcha based on a filename and an explicit action which writes a file.
- gkya 9y agoYou don't really put videos into a program's source tree. Also I don't think any modern Unix-like OS would overweite a file with a core dump no matter what is the name, and doubt that ancient versions did so too. Having the same set of device files under every directory is quite a different thing.
- inopinatus 9y agoActually, not only did they do exactly that, they could even be induced to do so through a symlimk, with hilarious results.
- angelsl 9y agoThis doesn't really have anything to do with *nix, but rather the customer being an idiot.
- deleted 9y ago[deleted]
- cup-of-tea 9y agoNice story, but unrelated. And I'm not sure why you mention Linux at all.
- cannam 9y agoWe had a source directory named "core" in an early version of the Rosegarden sequencer. At the time our build system was a simple Makefile, but in 2000 we switched to Automake and quickly learned that in some circumstances, using the Automake-generated Makefiles, "make clean" would delete the entire directory. Have generally avoided that name since then.
- batat 9y agoHow to delete "~" directory :) https://askubuntu.com/questions/26466/removing-folder-named https://askubuntu.com/questions/26466/removing-folder-named
- exprA 9y agoI.e. “how do I operate my shell”. You certainly want to understand shell expansion to get stuff done effectively.
- alexeiz 9y agoI hope that customer paid you enough for you trouble. But obviously it wasn't as much as it would have cost them to fix their crappy cron script.
- bitwize 9y agoThe lesson here is "suck it up and build software for the systems your customers use, not the ones you wish they used".