GNU bug report logs - #36362
New feature-x-check-server

Previous Next

Package: emacs;

Reported by: "otadmor ." <otadmor <at> gmail.com>

Date: Mon, 24 Jun 2019 17:08:01 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: otadmor <otadmor <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36362 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: bug#36362: New feature-x-check-server
Date: Sat, 12 Feb 2022 10:13:28 +0100
[Message part 1 (text/plain, inline)]
When running xlb function the code gets stuck in a native endless loop. The
patch I have added closes the fd of the xserver, which as a side effect
ends the endless loop. Some would say this patch is fixing a bug of a
dependency of emacs and not emacs itself (it is just that emacs uses it in
a certain way...).
This solution uses native timer (using signals) to detect the timeout. Upon
reaching a timeout it closes an the fd on the same thread as the xlb code
(this is because of how signals works).
To do this is lisp we need to answer the following:
1. How to find the fd of the current xserver using lisp?
2. How to call syscall close using lisp?
3. How to create native timers using lisp?
4. Is it even allowed to run lisp code while the main thread is in xlb
native code (stack frame is deep inside other library and this other
library was called from lisp).

On Sat, Feb 12, 2022, 09:18 Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> > This native function closes the fd of the xcb and causes the select to
> > return EINTR. xcb have internal infinate loop Incase of EINTR, so closing
> > the fd is necessary to get out of this infinite loop. Closing the fd also
> > causes libx11 to realize the connection was closed and call the error
> > handler of emacs for x11 failures for a clean termination of the
> resources
> > in emacs.
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> I don't think it would be appropriate to add a function like this to the
> C level of Emacs, because the use case is very limited.  And I think you
> can basically get the same functionality by using the xelb package
> (which talks to the X servers from Lisp).
>
> So I'm closing this bug report as a "wontfix".
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

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

Previous Next


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