emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb


From: Eli Zaretskii
Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb
Date: Wed, 06 Apr 2022 18:48:05 +0300

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 06 Apr 2022 14:33:50 +0200
> 
>     >> USABLE_POSIX_SPAWN is 0 on emacs-28 for every platform except macOS,
>     >> so applying the same patch as on master is all thatʼs needed.
> 
>     Eli> I didn't see USABLE_POSIX_SPAWN in the patch.  Maybe I was looking at
>     Eli> the wrong patch.  Can you show it?
> 
> USABLE_POSIX_SPAWN is 0 on emacs-28 for all platforms except macOS,
> and 1 on master for all platforms (modulo availability of some other
> required features) => posix_spawn can only be used by macOS on
> emacs-28.
> 
> emacs-28 callproc.c:
> 
> /* In order to be able to use `posix_spawn', it needs to support some
>    variant of `chdir' as well as `setsid'.  */
> #if defined DARWIN_OS                                     \
>   && defined HAVE_SPAWN_H && defined HAVE_POSIX_SPAWN     \
>   && defined HAVE_POSIX_SPAWNATTR_SETFLAGS                  \
>   && (defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR        \
>       || defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP) \
>   && defined HAVE_DECL_POSIX_SPAWN_SETSID                   \
>   && HAVE_DECL_POSIX_SPAWN_SETSID == 1
> # include <spawn.h>
> # define USABLE_POSIX_SPAWN 1
> #else
> # define USABLE_POSIX_SPAWN 0
> #endif
> 
> master callproc.c:
> 
> /* In order to be able to use `posix_spawn', it needs to support some
>    variant of `chdir' as well as `setsid'.  */
> #if defined HAVE_SPAWN_H && defined HAVE_POSIX_SPAWN        \
>   && defined HAVE_POSIX_SPAWNATTR_SETFLAGS                  \
>   && (defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR        \
>       || defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP) \
>   && defined HAVE_DECL_POSIX_SPAWN_SETSID                   \
>   && HAVE_DECL_POSIX_SPAWN_SETSID == 1
> # include <spawn.h>
> # define USABLE_POSIX_SPAWN 1
> #else
> # define USABLE_POSIX_SPAWN 0
> #endif
> 
> and all uses of posix_spawn are protected by USABLE_POSIX_SPAWN

We are mis-communicating, because that's not what I asked.

But never mind, I've looked at the sources, and I think it's safe to
backport this to the emacs-28 branch.

Thanks.



reply via email to

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