Linux – Is Linux considered XSI compliant or largely so

linuxposixstandard

From APUE

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?

Best Answer

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...