Sujet : macOS and UNIX conformance (was: Faking a TTY on a pipe/socketpair)
De : geoff (at) *nospam* clare.See-My-Signature.invalid (Geoff Clare)
Groupes : comp.unix.programmerDate : 16. Dec 2024, 15:05:44
Autres entêtes
Message-ID : <omo53l-38e.ln1@ID-313840.user.individual.net>
References : 1 2 3 4 5
User-Agent : Pan/0.154 (Izium; 517acf4)
Richard L. Hamilton wrote:
In article <vinp86$avd9$1@dont-email.me>,
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
On Tue, 3 Dec 2024 08:20:51 -0000 (UTC), Muttley wrote:
I'm wondering on Linux if it would be enough on Linux to spoof ttyname()
and isatty() using LD_PRELOAD. However it seems doing something similar
on a Mac is the usual over complicated Apple hot mess.
macOS may be a licensee of the "Unix" trademark, but it does not work the
way people expect when they think of the term "Unix".
It probably does as of the version of the formal specification they met
to be allowed to use the trademark.
It is certified as conforming to "UNIX 03", which is so named because
the certification program was launched in 2003, although by coincidence
the corresponding version of The Single UNIX Specification (SUS) is
version 3. There have since been SUSv4 (2008) and SUSv5 (2024) so
macOS is two versions behind. (AIX and Solaris are/were certified to
SUSv4; there is no certification program yet for SUSv5.)
SUSv3/4 included dlopen(), dlsym() and dlclose() but no other
requirements related to dynamic linking. SUSv5 adds the ability to
build shared libraries and dynamic executables using the c17 utility,
but doesn't specify how their loading can be controlled with
environment variables.
The things Lawrence said don't work on macOS the way people expect
UNIX to work are almost certainly all, just like LD_PRELOAD, not
specified by SUS. (Otherwise macOS would fail some of the tens of
thousands of tests it has to pass in order for each new macOS version
to be certified.)
-- Geoff Clare <netnews@gclare.org.uk>