5 ms·
Mac OS X isn't POSIX compliant
- geocar 17y agoLink to the relevant portion of POSIX (IEEE 1003.1): http://www.opengroup.org/onlinepubs/009695399/functions/rename.html http://www.opengroup.org/onlinepubs/009695399/functions/rena...
- wmf 17y agoI agree that this bug is worth fixing, but I don't think appealing to POSIX authority is a good idea. As we saw in the ext4 fsync debacle, what matters is expected behavior. POSIX (and its cousin UNIX®) doesn't matter.
- DarkShikari 17y agoThat was a case of "expected behavior" being a superset of POSIX, not a subset. POSIX's guarantee wasn't sufficient. This is a case where the behavior does not even live up to POSIX's guarantee, so I wouldn't say that it's comparable at all.
- nailer 17y agoI'd say the main issue is that it doesn't match the documentation. POSIX is severely out of date, and must be broken to do even simple things like handle filenames with spaces in them from a shell script.
- djcapelis 17y agoThis matters as this is one of the things a lot of carefully coded applications need to work or the rest falls down like a house of cards.
- demallien 17y agoOf course the counter point is that OS X passes the POSIX compliance tests, so this is apparently not considered to be a big deal. But instead of us debating hypotheticals, perhaps you could list some of the "a lot of carefully coded applications" that break without this. Facts are always preferable to hyperbole.
- geocar 17y agoSome programs that depend (specifically) on this behavior I'm aware of: qmail, postfix, dovecot These programs derive their purported reliability from these rename() semantics. By the way, Windows passed the POSIX conformance tests, but only a salesman thinks this means that Windows is POSIX compliant.
- demallien 17y agoYou're sure about sqlite? it's just that Apple use that extensively as the backend of CoreData, so it surprises me. Or to put it another way, sqlite by definition doesn't depend on this behaviour, because it runs successfully on Mac OS X...
- geocar 17y agoI just double-checked, and sqlite doesn't in fact use this. Perhaps I was remembering sqlite2. I've edited my post. Btw, Apple uses dovecot and postfix on their Xserve platform, which means Apple does depend on this behavior. Since this is a race condition on Mac OS X (Where it is atomic on UNIX and POSIXish systems like Linux), people may think these programs work fine on Mac OS X, when in fact they can lose or destroy mail in some circumstances.
- j_baker 17y agoActually, I would believe that and I'm not a salesman: http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_... Microsoft actually has a UNIX emulation layer for Windows.
- geocar 17y agoWindows was listed as POSIX-compatible (passing the POSIX conformance test suite) as early as Windows NT 3.51, and perhaps earlier. I was not referring to add-ons that can make Windows more POSIXish, but Windows itself.
- gscott 17y agoIt's Bug ID 5,799,661 so they have a few to work through before getting to that one.
- jvdh 17y agoActually, it's marked as duplicate of 5,398,777, so it jumped the queue ;)
- jleyank 17y agoIsn't this part of the Darwin portion of OSX, which is available? Has anybody checked the appropriate code to see how it differs from BSD/Linux?
- sambeau 17y agoThis post should be titled "Mac OS X has a bug in it".