From: Robert Pluim <rpluim@gmail.com>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: "Gerd Möllmann" <gerd.moellmann@gmail.com>, 58960@debbugs.gnu.org
Subject: bug#58960: 29.0.50; Assert fails when browsing an URL, bug#58960: 29.0.50; Assert fails when browsing an URL
Date: Wed, 02 Nov 2022 11:20:31 +0100 [thread overview]
Message-ID: <87k04dodxs.fsf@gmail.com> (raw)
In-Reply-To: <d01277dc-59e-b633-9ce2-6367f8e47df@gmail.com> (Tino Calancha's message of "Wed, 2 Nov 2022 05:48:30 +0100 (CET), Wed, 2 Nov 2022 05:48:30 +0100 (CET)")
>>>>> On Wed, 2 Nov 2022 05:48:30 +0100 (CET), Tino Calancha <tino.calancha@gmail.com> said:
Tino> emacs -Q
Tino> M-x browse-url RET
Tino> https://www.example.com RET
Tino> [The URL is opened by my default browser and Emacs crashes with the
Tino> following backtrace]
Tino> process.c:7386: Emacs fatal error: assertion failed: 0 <= fd
This goes away if you do something like 'M-x shell' first, right?
Looks like `call-process' needs to ensure the child signal fdʼs are
set up before calling `emacs_spawn'. Iʼm suprised nobody has run into
this before. Does the (dirty) patch below fix things for you?
Robert
--
diff --git i/src/process.c w/src/process.c
index 358899cded..4690addcf1 100644
--- i/src/process.c
+++ w/src/process.c
@@ -292,7 +292,7 @@ network_lookup_address_info_1 (Lisp_Object host, const char *service,
descriptor to notify `wait_reading_process_output' of process
status changes. */
static int child_signal_write_fd = -1;
-static void child_signal_init (void);
+void child_signal_init (void);
#ifndef WINDOWSNT
static void child_signal_read (int, void *);
#endif
@@ -7323,7 +7323,7 @@ DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0,
/* Set up `child_signal_read_fd' and `child_signal_write_fd'. */
-static void
+void
child_signal_init (void)
{
/* Either both are initialized, or both are uninitialized. */
diff --git i/src/callproc.c w/src/callproc.c
index 4d4b86629c..10ec643861 100644
--- i/src/callproc.c
+++ w/src/callproc.c
@@ -328,7 +328,7 @@ DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0,
this case NARGS must be at least 2 and ARGS[1] is the file's name.
At entry, the specpdl stack top entry must be close_file_unwind (FILEFD). */
-
+extern void child_signal_init (void);
static Lisp_Object
call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
specpdl_ref tempfile_index)
@@ -650,7 +650,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
block_input ();
block_child_signal (&oldset);
-
+ child_signal_init ();
child_errno
= emacs_spawn (&pid, filefd, fd_output, fd_error, new_argv, env,
SSDATA (current_dir), NULL, false, false, &oldset);
next prev parent reply other threads:[~2022-11-02 10:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 4:48 bug#58960: 29.0.50; Assert fails when browsing an URL Tino Calancha
2022-11-02 5:14 ` Gerd Möllmann
2022-11-02 10:20 ` Robert Pluim [this message]
2022-11-02 13:10 ` bug#58960: 29.0.50; Assert fails when browsing an URL, " Eli Zaretskii
2022-11-02 13:58 ` Robert Pluim
2022-11-02 15:09 ` Eli Zaretskii
2022-11-02 20:29 ` Paul Eggert
2022-11-03 3:00 ` Tino Calancha
2022-11-03 8:41 ` Robert Pluim
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k04dodxs.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=58960@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=tino.calancha@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.