Earlier quoted context omitted.
> Anyone that likes commodities of UNIX... This is an untrue generalization. I know people who have a Mac, yet do all of their actual coding within containers set up to use some flavor of Linux and never really touch the underlying OS. Macs DO have solid, reliable hardware underneath, but the insinuation that there is no reason you need to run a true POSIX compliant OS vs MacOS is definitely not a hard and fast truth…
OS X is posix-compliant. It doesn't implement certain GNUisms but depending on any vendor-specific problems is going to be a pain point.
1) That's a nearly 15-year-old standard (03 == 2003). Windows was certified to the predecessor POSIX standard.
2) While certified, it's compliance in actuality is poor. macOS's certified status says more about flaws in the certification test suite and administrative process, and the OpenGroup's need for income, than it does about macOS. The manual page for pselect, for example, even admits that it's not compliant!
FreeBSD, Linux, NetBSD, OpenBSD and probably DragonflyBSD are all more compliant in a practical sense than macOS, and much more compliant to the latest specification as they implement all or most of the newly defined interfaces, while macOS implements very few.
That said, yeah, macOS is compliant enough as a practical matter, especially compared to Windows. Porting stuff to macOS is about as painful as porting to Solaris or AIX, which is to say not very painful.
The biggest headaches with macOS are the bugs. For example, last week I was adding support for sendmsg/recvmsg and IP_PKTINFO in my Lua unix module and was able to reliably crash the kernel with a single line of unprivileged code:
https://www.irif.fr/~boutier/mac-crash.html
I was really confused at first. I had to reboot multiple times before I figured out it was my test code and not my hardware dying. After some Googling I found the above link that verified what I was seeing. This bug was only fixed, AFAIK, in macOS 10.12. (I don't have a 10.11 machine to test.) I was testing the code on 10.10, and as of the latest update a couple of days ago 10.10 is still broken AFAIK.The most famous problem was kqueue not supporting pipes, but that was fixed eons ago. There are alot of other problems with their neworking subsystem, though. For example, shutdown() fails if the associated stream has already entered the equivalent state, either because the sender sent RSET/FIN or shutdown was alreayd called; no other implementation does that. If you send a socket descriptor to another process with sendmsg and then immediately exit the process, the receiving process will receive an unuseable file descriptor. There are lots of stupid quirks like this that make writing reliable, high-availability software for macOS very difficult. Fortunately, few people use macOS for HA server stuff, but I like porting my software to other platforms because it helps catch bugs (bugs that, for w'eve reason, stay hidden when running on Linux), and macOS provides a poor signal/noise ratio in that regard.