by huh_lost_email · 6y ago · 0 comments
That said, a bunch of FreeBSD userland code and utilities were ported over to make the OS POSIX-ish.
It's probably easiest to think of a Mac as an amalgam of many different influences and operating behaviors, as opposed to a direct descendant of any one particular lineage.
[0] https://en.wikipedia.org/wiki/Darwin_%28operating_system%29
https://github.com/apple/darwin-xnu/tree/master/bsd
Also, more recently they imported pf from OpenBSD:
https://github.com/apple/darwin-xnu/blob/master/bsd/net/pf.c
Or do you mean that they have recently taken more code from other BSDs than FreeBSD?
They still have a lot of userland BSD parts. Including the very broken grep from FreeBSD (which is fixed in FreeBSD now IIRC):
$ echo "abcdef" | /usr/bin/grep -o "^..."
abc
def
(I have to use the full path to grep, because I replace macOS grep by GNU grep.)The macOS kernel is derived from what Apple chooses to release as XNU, which is Mach-ish.
There may be confusion due to the fact that Apple used to publish a Darwin iso that you could boot on their ppc machines, but that's been a long time and OSX is still Darwin. If you run uname on a mac it will tell you that it's Darwin.