🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.advocacy
Article #1277

Re: Why macOS Will Never Be A High-Performance OS

#1277
From: Lawrence D’Oliveiro
Date: Mon, 23 Nov 2026 19:54
67 lines
3701 bytes
On Mon, 23 Nov 2026 09:46:57 -0500, Bud Frede wrote:

> WolfFan <akwolffan@zoho.com> writes:
>
>> On Nov 13, 2026, Richard Kettlewell wrote
>> (in article <wwv5wy0cz69.fsf@LkoBDZeT.terraraq.uk>):
>>
>>> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>>>>
>>>> Really?? The macOS kernel does *not* provide a native poll()
>>>> call, it has to emulate it via select()?
>>>
>>> Why would you post that without checking?
>>
>> because he’s a know-nothing troll.
>>> It does have poll().
>>>
>>> https://github.com/apple-oss-distributions/xnu/blob/main/bsd/kern/sys_generic.c#L1681
>>>
>>> > That is so sad ...
>>>
>>> Well, something is sad, but I don’t think it’s macOS, in this instance.
>>
>> Anti-Apple trolls have been posting falsehoods for decades. He’s
>> not even original.
>
> They're not building good trolls anymore. They're all just retreads.
> :-)

So of course I had to check the source code. Didn’t anybody else do
that? Here’s the immediate context of the line in question:

    int
    poll(struct proc *p, struct poll_args *uap, int32_t *retval)
    {
        __pthread_testcancel(1);
        return poll_nocancel(p, (struct poll_nocancel_args *)uap, retval);
    }

And just below that is the poll_nocancel routine, which contains this:

    /*
         * This is kinda bogus.  We have fd limits, but that is not
         * really related to the size of the pollfd array.  Make sure
         * we let the process use at least FD_SETSIZE entries and at
         * least enough for the current limits.  We want to be reasonably
         * safe, but not overly restrictive.
         */
        if (nfds > OPEN_MAX ||
            (nfds > nofile && (proc_suser(p) || nfds > FD_SETSIZE))) {
            return EINVAL;
        }

What’s OPEN_MAX? It’s a hard-coded limit on the number of files a
single process can have open. A hard-coded limit which doesn’t exist
on Linux <https://bugzilla.redhat.com/show_bug.cgi?id=21346>.

And what’s FD_SETSIZE? It’s the size of the fixed-length array that
that the select(2) call takes.

Further down, another sad little comment:

    /* JMM - all this P_SELECT stuff is bogus */

So yes, on macOS, the poll(2) call is effectively being emulated by
select(2), complete with hard-coded limits on the number of file
descriptors you can pass!
Technical Details
Message-ID: <11e25lo$26e9r$2@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11d56lf$8idc$2@dont-email.me> <wwv5wy0cz69.fsf@LkoBDZeT.terraraq.uk> <0001HW.30ABA254026EF0157000014BE38F@news.supernews.com> <BlYMS.38043$V0W5.12339@fx01.iad>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups: comp.os.linux.misc,comp.sys.mac.advocacy
Subject: Re: Why macOS Will Never Be A High-Performance OS
Date: Mon, 23 Nov 2026 19:54:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <11e25lo$26e9r$2@dont-email.me>
References: <11d56lf$8idc$2@dont-email.me>
	<wwv5wy0cz69.fsf@LkoBDZeT.terraraq.uk>
	<0001HW.30ABA254026EF0157000014BE38F@news.supernews.com>
	<BlYMS.38043$V0W5.12339@fx01.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 23 Nov 2026 19:54:33 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2308411"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/vQm7uErtz106S4Y4N7DOQ"; posting-host="4f27ea11f2f51026c41551539ec42af9"
User-Agent: Pan/0.165 (Kostiantynivka)
Cancel-Lock: sha1:xmHQFtLbty5muJPemsIYr6Kqfdg= sha256:eklPCfg2EaxNBZPDvRcGgWgWQTATth2w0vscR+62l38=
	sha1:aLuhSWRo6W48X56m/NZDIHmVJWE= sha256:hoX4n/eqi1smkeX4hsk4HcoqZDmjLu/xMJmHIuTIIn0=