Re: UNIX Compatibility

david
2011-05-24T18:23:39Z

On Tue, 24 May 2011, Richard Yao wrote:

> With that out of the way, I am under the impression that the Linux
> kernel code is in some way incompatible with the Single Unix
> Specification (i.e. the thing required for an OS to be certified as
> being UNIX).

I beleive it's less a matter of being incompatible and more a matter of
not having been certified as being compatible.

a historic note: at the time that Linux was getting started, getting
certified as Unix was a very expensive undertaking (and Linux definantly
did not comply in the early days anyway). Even getting the full specs was
an expensive thing (at least for an individual)

as such, there are probably some differences that crept in (like the error
codes you refer to below), but the biggest difference is that there are
additional system calls available on Linux compared to Unix

That being said, the differences are minor enough that many flavors of
Unix have implemented Linxu compatibility layers to support unmodified
linux binarires, and recompiling code written for Unix almost always 'just
works' on Linux (the biggest issue is usually libraries)

> It seems Linus Torvalds wanted to use the UNIX System V call codes
> when he was working on Linux 0.0.1, but he lacked a reference at the
> time, so he only got them partially right. Considering that the error
> codes were originally intended to be compatible with UNIX System V, it
> might be worth changing them to match. The Linux 3.0 change would
> probably be a good time for this.

and what exactly would the advantage be of breaking backwards
compatibility with all existing linux code?

I don't see any real advantage.

David Lang