The Single UNIX Specification, a superset of the POSIX.1 standard, specifies additional interfaces that extend the functionality provided by the POSIX.1 specification. POSIX.1 is equivalent to the Base Specifications portion of the Single UNIX Specification.

The X/Open System Interfaces (XSI) option in POSIX.1 describes optional interfaces and defines which optional portions of POSIX.1 must be supported for an implementation to be deemed XSI conforming. These include file synchronization, thread stack address and size attributes, thread process-shared synchronization, and the _XOPEN_UNIX symbolic constant (marked ‘‘SUS mandatory’’ in Figure 2.5). Only XSI-conforming implementations can be called UNIX systems.

Is it correct that SUS consists exactly of POSIX and XSI?

Is it correct that Linux (or Ubuntu, Debian in particular) is POSIX compliant?

Is Linux (or Ubuntu, Debian in particular) considered XSI compliant or largely so? I ask this because then I will know whether the parts in APUE labelled for XSI apply to Linux (or Ubuntu, Debian in particular).

I am mainly interested in API, so does that mean Linux kernel suffices?

  • 3
    Re your first question, see Is Posix a subset of Single UNIX Specification? – Stephen Kitt Sep 5 '18 at 12:46
  • 2
    Re the second question, see Why isn't GNU/Linux SUS v3+ compliant?. – Kusalananda Sep 5 '18 at 12:47
  • @Kusalananda: Your pointer points to a wrong answer: Linux had an offer to get a full (assisted by Andrew Josey) certificaton for one Dollar but after a while told the OpenGroup that they are not willing to become fully compliant. – schily Sep 5 '18 at 12:58
  • 1
    @schily was that for Linux in general (and if so, how was it defined), or a specific distribution? (Or perhaps several distributions...) – Stephen Kitt Sep 5 '18 at 13:00
  • AFAIR, this was at the end mainly caused by the people behind the GNU tools. – schily Sep 5 '18 at 13:01

Linux is not fully POSIX compliant. There are e.g. system calls that behave differently (sorry I currently do not remember what the differences are exactly; I'll describe them here when I remember again).

One problem is e.g. that Linux does not include a correct waitid() system call (that delivers all 32 bits from the exit() parameter) and the Linux kernel people do not like to fix this. (waitid() has existed since AT&T System V Release 4..)

Some of the XSI features are implemented in Linux but not all of them.

bash (the way it is compiled for Linux distros) comes e.g. with a non XSI compliant echo builtin, dash does not support multi byte chars which is required by XSI. This happened after some time of POSIX adoptions after Linux got the offer to get an assisted certification for one Dollar.

If you like to get a correct overview, you might be interested to search the net for the final paper of POSIX non-compliances in Linux from Andrew Josey that has been written after the Linux people told the Opengroup that they are no longer interested in becomming POSIX compliant.

See: http://www.opengroup.org/personal/ajosey/tr20-08-2005.txt

BTW: There are rumors that Red Hat recently received a copy of the POSIX test suite, so it may be that there is a hidden ongoing certification...

  • 1
    Also relevant is the section on POSIX compliance in the GNU C library manual. – Stephen Kitt Sep 5 '18 at 12:58
  • 5
    Linux is not an OS, just a kernel, so by itself it cannot be POSIX compliant. Inspur K-UX 3.0 is one example of a Linux-based system that has been certified as compliant to UNIX 03. – Stéphane Chazelas Sep 5 '18 at 13:06
  • @StéphaneChazelas or Ubuntu, Debian. I am mainly interested in API, so does that mean Linux kernel suffices? – Tim Sep 5 '18 at 13:26
  • Aide-mémoire: en.wikipedia.org/w/index.php?diff=prev&oldid=711347640 – JdeBP Sep 5 '18 at 13:36
  • 1
    @StéphaneChazelas: You seem to missnderstand a POSIX certification. If Martijn Dekker did make a bug report against the austin group standard, this would have resulted in an updated test suite. Getting the seal does not mean a platform is fully compliant but that it passed all tests. Any platform that got the seal needs to recheck the compliance once a year with the actual version of the test suite. The enhanced ksh88 from /usr/xpg4/bin/sh is much closer to the POSIX standard than ksh93 or bash and it seems to be changed when non-compliances are detected. – schily Sep 5 '18 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.