[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs macOS build warnings
From: |
Mattias Engdegård |
Subject: |
Re: Emacs macOS build warnings |
Date: |
Sun, 6 Feb 2022 17:14:07 +0100 |
6 feb. 2022 kl. 17.00 skrev Alan Third <alan@idiocy.org>:
> On the latest macOS I believe vfork now does the same thing as fork,
> so it might be easiest to detect the OS version and unset HAVE_VFORK,
> although since we don't seem to actually check for that directly in
> configure.ac I guess it's perhaps a standard test in autoconfig which
> may make it hard to over-ride?
In the version I am using (11.6.3), which is also the most recently supported
for my machine, vfork is measurably faster than fork so it isn't an alias yet.
In other words, unsetting HAVE_VFORK would lead to a performance regression.
> The alternative approach is to look at whether we should be using
> posix_spawn here. I was under the impression that we had already
> switched to using posix_spawn, at least on macOS, so I guess these
> calls to vfork were missed.
The idea is to use posix_spawn when possible; according to comments in the
code, that function cannot be used in some circumstances such as when we need
to use PTYs instead of pipes. I haven't verified whether this is actually true.
I'm sure you are happy to hear that dropping fork/exec is high on my list of
things to discuss with Ken and Dennis when I finally get my time machine
working.
>> I treated CTGetCoreTextVersion warning by following the direction in
>> the deprecation message and used NSProcesInfo instead, and it seems
>> to work although it's a bit clumsy. Is there a better way?
>
> I think your fix for this is good and probably the right thing to do.
Thank you, I shall commit it as a separate change then.