unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jacob Faibussowitsch <jacob.fai@gmail.com>
To: 51925@debbugs.gnu.org
Subject: bug#51925: [Trunk][macOS] "vfork" is deprecated
Date: Wed, 17 Nov 2021 11:50:46 -0600	[thread overview]
Message-ID: <9FD9579F-AB2E-4425-999C-377ED34AA66D@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2601 bytes --]

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)


[-- Attachment #2: Type: text/html, Size: 4956 bytes --]

             reply	other threads:[~2021-11-17 17:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 17:50 Jacob Faibussowitsch [this message]
2021-11-17 17:58 ` bug#51925: [Trunk][macOS] "vfork" is deprecated Eli Zaretskii
2021-11-17 18:02   ` Jacob Faibussowitsch
2021-11-17 18:08     ` Jacob Faibussowitsch
2021-11-17 18:25     ` Eli Zaretskii
     [not found] ` <m2ilwqfuiy.fsf@fastmail.fm>
     [not found]   ` <D05C8617-3056-4753-A5CE-B0AC8D1FC215@gmail.com>
2021-11-17 20:16     ` Filipp Gunbin
2021-11-18 15:50       ` Jacob Faibussowitsch
2021-11-18 17:09         ` Filipp Gunbin
2022-09-20 15:20         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9FD9579F-AB2E-4425-999C-377ED34AA66D@gmail.com \
    --to=jacob.fai@gmail.com \
    --cc=51925@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).