GNU bug report logs -
#29170
Emacs freezes when doing a gui-get-selection on OpenBSD
Previous Next
Reported by: daimrod <at> omecha.info (Grégoire Jadi)
Date: Mon, 6 Nov 2017 14:22:02 UTC
Severity: normal
Tags: confirmed
Merged with 45544
Found in versions 26.0.90, 27.1.90
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 29170 <at> debbugs.gnu.org (full text, mbox):
[Accidentally sent off-list, forwarding message to bug tracker.]
-------------------- Start of forwarded message --------------------
From: Stefan Kangas <stefan <at> marxist.se>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Subject: Re: bug#29170: Infinite loop noticed on Emacs in OpenBSD
Date: Mon, 10 Aug 2020 09:25:29 -0700
Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
> Hi,
>
> Here is a patch against HEAD to avoid the hang in infinite loop. The
> 'x-selection-timeout' pause will still be there even with this patch.
>
> My understandings:
>
> On OpenBSD, most of the time, the function
> "xselect.c/x_get_foreign_selection" won't get a SelectNotify with
> (SECONDARY, TEXT) as arguments (that I did not understand and it might
> never happen on other oses).
>
> But then, while waiting at most 'x-selection-timeout' into
> "process.c/wait_reading_process_output" the 'now' variable won't have a
> chance of being invalidated or updated and that is what cause the
> infinite loop.
>
> Someone more knowledgeable of "process.c/wait_reading_process_output"
> might have a better solution to this problem.
>
> diff --git a/src/process.c b/src/process.c
> index fc46e74332..25bd28a82b 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -5115,8 +5115,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
> /* Exit if already run out. */
> if (wait == TIMEOUT)
> {
> - if (!timespec_valid_p (now))
> - now = current_timespec ();
> + now = current_timespec ();
> if (timespec_cmp (end_time, now) <= 0)
> break;
> timeout = timespec_sub (end_time, now);
That was almost 3 years ago. Is this still an issue on recent versions
of Emacs?
Best regards,
Stefan Kangas
-------------------- End of forwarded message --------------------
This bug report was last modified 3 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.