Is OSX a POSIX OS?

前端 未结 4 2128
刺人心
刺人心 2020-12-23 16:05

What is it that makes an OS a POSIX system? All versions of Linux are POSIX, right? What about OSX?

相关标签:
4条回答
  • 2020-12-23 16:33

    POSIX is a specification: http://www.unix.org/what_is_unix/single_unix_specification.html AFAIK, Linux adheres to the spec, but hasn't certified yet

    0 讨论(0)
  • 2020-12-23 16:39

    No, it is not. MacOS is missing a whole bunch of features of POSIX, like clock_nanosleep(). It might be compliant with a subset of POSIX or with a really really old version of POSIX, but it's definitely not compliant with POSIX.1-2017. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html.

    0 讨论(0)
  • 2020-12-23 16:51

    Yes, OS X is based on Darwin BSD, and since 10.5 (Leopard - 18-May-2007) all Intel/AMD versions have been officially certified as compliant with the Unix 03 / POSIX standard eg.

    • UNIX® 03 - Mac OS X Version 10.5 Leopard
    • Apple Registers Mac OS X 10.8 Mountain Lion to the UNIX® 03 Standard
    • UNIX® 03 - OS X version 10.11 El Capitan
    0 讨论(0)
  • 2020-12-23 16:54

    Yes. POSIX is a group of standards that determine a portable API for Unix-like operating systems. Mac OSX is Unix-based (and has been certified as such), and in accordance with this is POSIX compliant. POSIX guarantees that certain system calls will be available.

    Essentially, Mac satisfies the API required to be POSIX compliant, which makes it a POSIX OS.

    All versions of Linux are not POSIX-compliant. Kernel versions prior to 2.6 were not compliant, and today Linux isn't officially POSIX-compliant because they haven't gone out of their way to get certified (which will likely never happen). Regardless, Linux can be treated as a POSIX system for almost all intents and purposes.

    0 讨论(0)
提交回复
热议问题