bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51925: [Trunk][macOS] "vfork" is deprecated


From: Jacob Faibussowitsch
Subject: bug#51925: [Trunk][macOS] "vfork" is deprecated
Date: Wed, 17 Nov 2021 11:50:46 -0600

Hello Emacs Devs,

I have recently been getting the following warnings building emacs on macOS Big Sur v11.6.1 with clang:

sysdep.c:667:11: warning: 'vfork' is deprecated: Use posix_spawn or fork [-Wdeprecated-declarations]
    pid = vfork ();
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:604:1: note: 'vfork' has been explicitly marked deprecated here
__deprecated_msg("Use posix_spawn or fork")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:208:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning generated.

callproc.c:1478:11: warning: 'vfork' is deprecated: Use posix_spawn or fork [-Wdeprecated-declarations]
    pid = vfork ();
          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:604:1: note: 'vfork' has been explicitly marked deprecated here
__deprecated_msg("Use posix_spawn or fork")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:208:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning generated.

————————————————————————————————————————————————

This is by no means breaking or disrupting anything on my end (at least that I can tell), but I did notice in some commit messages a few weeks that someone was attempting to replace vfork with posix_spawn specifically on macOS, so maybe my system is some unhandled corner-case?

commit cc4edea872ca653f3e0631ce50e47b5260c6773a
Author: Philipp Stephani <phst@google.com>
Date:   Wed Dec 30 14:42:01 2020 +0100

    Use posix_spawn if possible.

    posix_spawn is less error-prone than vfork + execve, and can make
    better use of system-specific enhancements like 'clone' on Linux.  Use
    it if we don't need to configure a pseudoterminal.

    Backported from commit a60053f8368e058229721f1bf1567c2b1676b239.
    Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
    there posix_spawn is much faster than vfork.

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]