* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb [not found] ` <87ilrp6iqg.fsf@gmail.com> @ 2022-04-06 9:02 ` Robert Pluim 2022-04-06 11:09 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Robert Pluim @ 2022-04-06 9:02 UTC (permalink / raw) To: emacs-devel >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim <rpluim@gmail.com> said: Robert> In emacs-28 we only use posix_spawn on macOS because its vork is Robert> sub-optimal. I donʼt remember the rationale for switching to using it Robert> everywhere, itʼs undoubtedly in the archives somewhere. Robert> Closing. Robert> Committed as 8103b060d8 Actually, do we want this in emacs-28 as well? Robert -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 9:02 ` bug#54667: 29.0.50; posix_spawn breaks emacs-gdb Robert Pluim @ 2022-04-06 11:09 ` Eli Zaretskii 2022-04-06 12:04 ` Robert Pluim 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2022-04-06 11:09 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel > From: Robert Pluim <rpluim@gmail.com> > Date: Wed, 06 Apr 2022 11:02:12 +0200 > > >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim <rpluim@gmail.com> said: > Robert> In emacs-28 we only use posix_spawn on macOS because its vork is > Robert> sub-optimal. I donʼt remember the rationale for switching to using it > Robert> everywhere, itʼs undoubtedly in the archives somewhere. > > Robert> Closing. > Robert> Committed as 8103b060d8 > > Actually, do we want this in emacs-28 as well? The fix installed on master isn't macOS-specific, AFAICT. Can it be reasonably installed on emacs-28 as macOS-specific? If yes, I think we should indeed backport it. Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 11:09 ` Eli Zaretskii @ 2022-04-06 12:04 ` Robert Pluim 2022-04-06 12:21 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Robert Pluim @ 2022-04-06 12:04 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel >>>>> On Wed, 06 Apr 2022 14:09:04 +0300, Eli Zaretskii <eliz@gnu.org> said: >> From: Robert Pluim <rpluim@gmail.com> >> Date: Wed, 06 Apr 2022 11:02:12 +0200 >> >> >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim <rpluim@gmail.com> said: Robert> In emacs-28 we only use posix_spawn on macOS because its vork is Robert> sub-optimal. I donʼt remember the rationale for switching to using it Robert> everywhere, itʼs undoubtedly in the archives somewhere. >> Robert> Closing. Robert> Committed as 8103b060d8 >> >> Actually, do we want this in emacs-28 as well? Eli> The fix installed on master isn't macOS-specific, AFAICT. Can it be Eli> reasonably installed on emacs-28 as macOS-specific? If yes, I think Eli> we should indeed backport it. 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. Robert -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 12:04 ` Robert Pluim @ 2022-04-06 12:21 ` Eli Zaretskii 2022-04-06 12:33 ` Robert Pluim 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2022-04-06 12:21 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel > From: Robert Pluim <rpluim@gmail.com> > Cc: emacs-devel@gnu.org > Date: Wed, 06 Apr 2022 14:04:39 +0200 > > >>>>> On Wed, 06 Apr 2022 14:09:04 +0300, Eli Zaretskii <eliz@gnu.org> said: > > >> From: Robert Pluim <rpluim@gmail.com> > >> Date: Wed, 06 Apr 2022 11:02:12 +0200 > >> > >> >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim <rpluim@gmail.com> said: > Robert> In emacs-28 we only use posix_spawn on macOS because its vork is > Robert> sub-optimal. I donʼt remember the rationale for switching to using it > Robert> everywhere, itʼs undoubtedly in the archives somewhere. > >> > Robert> Closing. > Robert> Committed as 8103b060d8 > >> > >> Actually, do we want this in emacs-28 as well? > > Eli> The fix installed on master isn't macOS-specific, AFAICT. Can it be > Eli> reasonably installed on emacs-28 as macOS-specific? If yes, I think > Eli> we should indeed backport it. > > 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. I didn't see USABLE_POSIX_SPAWN in the patch. Maybe I was looking at the wrong patch. Can you show it? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 12:21 ` Eli Zaretskii @ 2022-04-06 12:33 ` Robert Pluim 2022-04-06 15:48 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Robert Pluim @ 2022-04-06 12:33 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel >>>>> On Wed, 06 Apr 2022 15:21:16 +0300, Eli Zaretskii <eliz@gnu.org> said: >> From: Robert Pluim <rpluim@gmail.com> >> Cc: emacs-devel@gnu.org >> Date: Wed, 06 Apr 2022 14:04:39 +0200 >> >> >>>>> On Wed, 06 Apr 2022 14:09:04 +0300, Eli Zaretskii <eliz@gnu.org> said: >> >> >> From: Robert Pluim <rpluim@gmail.com> >> >> Date: Wed, 06 Apr 2022 11:02:12 +0200 >> >> >> >> >>>>> On Mon, 04 Apr 2022 16:11:51 +0200, Robert Pluim <rpluim@gmail.com> said: Robert> In emacs-28 we only use posix_spawn on macOS because its vork is Robert> sub-optimal. I donʼt remember the rationale for switching to using it Robert> everywhere, itʼs undoubtedly in the archives somewhere. >> >> Robert> Closing. Robert> Committed as 8103b060d8 >> >> >> >> Actually, do we want this in emacs-28 as well? >> Eli> The fix installed on master isn't macOS-specific, AFAICT. Can it be Eli> reasonably installed on emacs-28 as macOS-specific? If yes, I think Eli> we should indeed backport it. >> >> 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 Robert -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 12:33 ` Robert Pluim @ 2022-04-06 15:48 ` Eli Zaretskii 2022-04-07 11:10 ` Robert Pluim 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2022-04-06 15:48 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel > 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb 2022-04-06 15:48 ` Eli Zaretskii @ 2022-04-07 11:10 ` Robert Pluim 0 siblings, 0 replies; 7+ messages in thread From: Robert Pluim @ 2022-04-07 11:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel >>>>> On Wed, 06 Apr 2022 18:48:05 +0300, Eli Zaretskii <eliz@gnu.org> said: Eli> But never mind, I've looked at the sources, and I think it's safe to Eli> backport this to the emacs-28 branch. Done as 98abf01fd6 Robert -- ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-07 11:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <f26aa6b4-654d-dbba-4e6f-4c71a03e3d5a@gmail.com> [not found] ` <87fsmx80e5.fsf@gmail.com> [not found] ` <4d6ef0f6-8ab6-2dce-aa63-d18108fd5f21@gmail.com> [not found] ` <87bkxk983m.fsf@gmail.com> [not found] ` <87ilrp6iqg.fsf@gmail.com> 2022-04-06 9:02 ` bug#54667: 29.0.50; posix_spawn breaks emacs-gdb Robert Pluim 2022-04-06 11:09 ` Eli Zaretskii 2022-04-06 12:04 ` Robert Pluim 2022-04-06 12:21 ` Eli Zaretskii 2022-04-06 12:33 ` Robert Pluim 2022-04-06 15:48 ` Eli Zaretskii 2022-04-07 11:10 ` Robert Pluim
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).