Apple macOS 15 Sequoia is officially Unix

2 years ago (theregister.com)

This isn’t new for Sequioa. OS X has been certified by the Open Group for decades now.

  • Each OS release has to be separately certified for UNIX, it is indeed new for Sequoia.

  • (According to wikipedia: All versions of macOS from Mac OS X Leopard to macOS 10.15 Catalina, except for OS X Lion,[68] have been registered on Intel-based systems, and all versions from macOS 11 Big Sur, the successor to macOS Catalina, to macOS 14 Sonoma have been registered on both x86-64 and ARM64 systems.)

Why is this relevant?

Who is interested about such certification?

  • Most cross-platform applications for desktops and servers. If you write to the POSIX standard, it will work on a wide range of systems. Many applications don't need to go beyond that.

How is macOS certified as 'Unix' but the modern BSD's aren't? Didn't they all come from the same codebase?

  • It's not simply that certification costs money. It's that a lot of modern UNIX-like operating systems don't adhere to the UNIX spec. For example, the OpenBSD man pages specify the ways in which they diverge from POSIX and UNIX in the Standards section: https://man.openbsd.org/sh.1#STANDARDS, https://man.openbsd.org/awk.1#STANDARDS. Often times these are small deviations that might not matter to most people, but it means that they aren't UNIX.

    Terry Lambert has written about the work he did to make Mac OS X UNIX compliant: https://www.quora.com/What-goes-into-making-an-OS-to-be-Unix...

    I don't know how much it costs for the Open Group to certify an OS as UNIX compliant (if anything).

    A lot of the time, things are compliant in most of the common stuff, but they might not implement all of UNIX or POSIX. Close isn't compliant, but it's enough that most people don't care. For example, do you care if your Linux disto comes with the `pax` command? Or do you just use `tar`?

    Apple had started calling OS X UNIX and was being sued for calling it UNIX when it wasn't actually UNIX. They decided it'd be cheaper to do the work to make OS X UNIX compliant than to deal with the lawsuit and that's what they did. BSDs never cared about calling themselves UNIX so they never went into the nitty gritty of making themselves UNIX compliant.

    • I agree, though I feel compelled to post that the BSDs learned their lesson about the use of the UNIX trademark the hard way. Part of what caused the classic lawsuit between the Regents of the University of California (the "Berkeley" in Berkeley Software Distribution) and AT&T was the fact that a spinoff company selling BSD had the phone number 1-800-ITS-UNIX:

      https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc.....

      This lawsuit happened (1992-1994) when Linux was in its infancy (Linus Torvalds started work on Linux in 1991). Had the future of BSD not been so uncertain during this lawsuit, it is quite possible that some derivative of BSD would be the dominant FOSS operating system today instead of Linux.

      1 reply →

The brown M&M test is: can you call poll() on a terminal device?

This lack of functionality has been in existence since Mac OS X's inception. It's the reason why a cross-platform software _always_ has to support both select() and poll() to check if a user is typing on the terminal -- select() just for Mac OS X, and poll() for every other system. Wouldn't it be nice if we could standardise on poll()?

Compare what macOS manpages say:

https://developer.apple.com/library/archive/documentation/Sy...

> BUGS: The poll() system call currently does not support devices.

with the requirements for certification:

https://pubs.opengroup.org/onlinepubs/9799919799.2024edition...

> The poll() and ppoll() functions shall support regular files, terminal and pseudo-terminal devices, FIFOs, pipes, and sockets.

Is the bug fixed in macOS 15 or is this certification yet another load of horseshit?

Certification aside, Linux and macOS are so similar that I only think about the difference in the rare instances where they differ: three that come to mind are xdg-open vs. open , systemd vs. launchd, and sed -i vs. sed -i ''.

  • GNU coreutils often have many different options than their BSD counterparts. They both (generally) share a POSIX-specified base wrt options and behavior, but if you commonly only work with one of the two, it's easy to accidentally write non-portable shell scripts.

  • GNU vs BSD grep is the main one for me. And all the other extremely convenient GNU-isms that I've grown used to in GNU/Linux.

    • The only GNU-ism I really missed was the `--group-directories-first` option for `ls`

      But that was easy enough to fix. ¯\_(ツ)_/¯

  • For me it's the fact that options cannot come at the end, eg this "rm somedir -r" which I always do (habit) works only with gnu version of cmds.

I've never understood how they keep getting certified when, if I recall correctly, POSIX semaphores are broken on MacOS

I wonder what's the reason for Apple to do this though? Convincing more people to run a macOS server instead of a Linux/BSD one is unlikely the reason (in my mind), but it doesn't make any other sense either...

  • Official Unix certification may matter at workplaces and institutions where such certifications are required for meeting some type of compliance criteria. For example, if I remember correctly, early versions of Windows NT had a POSIX compatibility layer, which was crucial for getting Windows NT accepted by some US government agencies.

I'm hoping this pushes them to finally implement the glaring gaps in Unix compat: specifically pipe2.

  • But is pipe2 not Linux specific? It isn’t POSIX, AFAIK.

    • It originally showed up in Linux, but it's pretty much universal except for MacOS. I mostly hope they start taking the "unix" part of the OS seriously again. It's been almost frozen in time.

This sounds rather dry and abstract. What I would rather like to know is: If I installed Sequoia on my x86_64 Mac, what would I lose in comparison to Ventura? I assume newer OSs increasingly drop x64 support.

Curious, why does it matter?

  • Marketing. They called OS X, as it was at the time, ‘UNIX’ but didn’t pay the Open Group for certification. The Open Group sued, and Apple figured it was cheaper to certify, so they did, and have done ever since.

I mean I know for all practical purposes that this really doesn’t mean much, but it means a lot to me; I was a big Sun guy back in the day, and a dash if Irix here and there.

my problem with macos is not Unix certification but its keyboard,the odd CMD key messed up with my other ten non Mac keyboards

  • I love CMD because it’s part of the copy/paste shortcut but not used for any terminal control codes. So there’s no confusion about whether you’re going to accidentally SIGTERM something in the terminal by trying to copy text.

    I really really wish I could have this behavior on Linux… but alas, every app under the sun chooses its own copy/paste shortcut and they all use ctrl+C/V by convention so you can’t configure it globally without rewriting every app (ok maybe you could narrow it down to a few GUI libraries like gtk/qt/etc but it’s still a huge undertaking.)

    I’d settle for “ctrl-c is copy if text is selected, SIGTERM otherwise” logic, which I think Windows’s console uses, but none of the Linux terminals I’ve tried support that. I’m left with ctrl-shift-C for copy, which leaks into my muscle memory, then I accidentally use that combo in the web browser too and it opens developer tools or something. So annoying.

  • I think it’s what you’re used to. I’m used to the Mac keyboard (since 1994) and I much prefer the command key for keyboard shortcuts. I can use my thumb all day but pressing control with my pinkie starts to hurt really quickly!

    • Press Ctrl with a side of your palm, I've been doing that for years after a brief stint with emacs, no problems with the finger.

      Also, on decent keyboards (not necessarily expensive) you can remap the keys anyway.

      1 reply →

  • I’ve used MacOS with an old IBM model M for 20 years… I map the caps lock key to CMD, as I dislike and never use caps lock.