GNU bug report logs - #54667
29.0.50; posix_spawn breaks emacs-gdb

Previous Next

Package: emacs;

Reported by: Herman, Géza <geza.herman <at> gmail.com>

Date: Fri, 1 Apr 2022 10:52:01 UTC

Severity: normal

Tags: fixed

Found in version 29.0.50

Fixed in version 29.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 54667 <at> debbugs.gnu.org (full text, mbox):

From: Herman, Géza <geza.herman <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 54667 <at> debbugs.gnu.org
Subject: Re: bug#54667: 29.0.50; posix_spawn breaks emacs-gdb
Date: Fri, 1 Apr 2022 15:29:50 +0200
I can confirm that it fixes the problem.

For reference, here's the patch: 
https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067.html

(Btw., according to this email thread, vfork is faster than posix_spawn 
on Linux, so maybe it'd make sense to use posix_spawn only on non-Linux 
platforms?)

On 2022-04-01 14:16, Robert Pluim wrote:
>>>>>> On Fri, 1 Apr 2022 12:51:43 +0200, Herman <at> debbugs.gnu.org, Géza <geza.herman <at> gmail.com> said:
>      Herman> There's a gdb frontend: https://github.com/weirdNox/emacs-gdb
>      Herman> With the emacs commit "a60053f836 Use posix_spawn if possible.",
>      Herman> emacs-gdb doesn't work properly: when starting an executable, gdb says
>      Herman> that it's running, but in reality, it doesn't start. The process
>      Herman> itself is started, gdb attaches to it, but the process still not run
>      Herman> for some reason.
>
>      Herman> You can reproduce this:
>      Herman> 1. install emacs-gdb
>      Herman> 2. M-x gdb-executable, enter any executable, like "/bin/ls". emacs-gdb
>      Herman> should open a new frame.
>      Herman> 3. Then press f5 (this executes gdb-run-or-continue), this should
>      Herman> start the process in gdb.
>
>      Herman> Before the mentioned commit, this worked, and "ls" was run
>      Herman> properly. But with this commit, "ls" isn't started.
>
>      Herman> I checked this with a recent master
>      Herman> (bd5d136777ef30f36807c7e690413846ed38fce1), and still happens. Adding
>
>      Herman> #undef USABLE_POSIX_SPAWN
>      Herman> #define USABLE_POSIX_SPAWN 0
>
>      Herman> to callproc.c at line 49 fixes the issue.
>
> Thereʼs a patch from Jürgen Hötzel in <86o82mvybj.fsf <at> hoetzel.info> on
> emacs-devel that should fix it (I haven't had a chance to fully test
> it).
>
> Robert





This bug report was last modified 3 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.