From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50043: 28.0.50; USABLE_SIGOI undef code paths do not work correctly Date: Mon, 15 Nov 2021 19:24:02 +0200 Message-ID: <83czn12uz1.fsf@gnu.org> References: <874kbtfthj.fsf@gnus.org> <835yw9cwoa.fsf@gnu.org> <87mtpla013.fsf@gnus.org> <83zgtlbaw6.fsf@gnu.org> <87fsvcuttw.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 50043@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 15 18:25:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmfjP-0008bI-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Nov 2021 18:25:24 +0100 Original-Received: from localhost ([::1]:60936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmfjO-0000qN-ND for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Nov 2021 12:25:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmfj4-0000q7-Pf for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 12:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmfj4-0003eW-Hk for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 12:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmfj4-00015Y-FT for bug-gnu-emacs@gnu.org; Mon, 15 Nov 2021 12:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Nov 2021 17:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50043 X-GNU-PR-Package: emacs Original-Received: via spool by 50043-submit@debbugs.gnu.org id=B50043.16369970604097 (code B ref 50043); Mon, 15 Nov 2021 17:25:02 +0000 Original-Received: (at 50043) by debbugs.gnu.org; 15 Nov 2021 17:24:20 +0000 Original-Received: from localhost ([127.0.0.1]:56013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfiO-000141-5g for submit@debbugs.gnu.org; Mon, 15 Nov 2021 12:24:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfiM-00013o-CC for 50043@debbugs.gnu.org; Mon, 15 Nov 2021 12:24:18 -0500 Original-Received: from [2001:470:142:3::e] (port=42422 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmfiG-0003Zc-PU; Mon, 15 Nov 2021 12:24:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7vKz06MOerIefIiDeQK8W/sjQkiqr6xD0GbQ6d4NToc=; b=BFvYoLhulxHb O2Ec+m4Fpn61GIkPcpfafjUQfZJw1IEviU7hN2OLA/vs3HyuZCGQNz4zqaWVdicatTPO1XZ5jnJqp rsvwSPZeTyWNsV/GDMYRb1cFdCZAePJaPw7dY17sVXAsItQiq4udintGOibm/dKhB5q3wR5ZESdVI 6Zb6k31Z6Jyp6kulQZoAPxH+QZCaI5JSlMiJs05KnjLjKZytsgVLMDImdZln59Dfbtkpgc6BhWEyH QqCxVvIhgWGRodkz5tqS+fz0+/Ion5+1BIS/SzM1to5QtLyDyl+MO2wuLcb69HfgWuVebZMp5t1Vr YlJVeX37/oZkaqEfOk97Bg==; Original-Received: from [87.69.77.57] (port=3417 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmfiG-0003ZN-Bf; Mon, 15 Nov 2021 12:24:12 -0500 In-Reply-To: (message from Ken Brown on Mon, 15 Nov 2021 10:19:32 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220066 Archived-At: > Date: Mon, 15 Nov 2021 10:19:32 -0500 > Cc: 50043@debbugs.gnu.org > From: Ken Brown > > x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, > Lisp_Object time_stamp, Lisp_Object frame) > { > [...] > wait_reading_process_output (secs, nsecs, 0, false, > reading_selection_reply, NULL, 0); > > I think wait_reading_process_output gets stuck for 2 seconds in a call to select > (actually xg_select because I'm testing a gtk build). This is independent of > the fact that x-selection-timeout is 2 seconds; it happens even if > x-selection-timeout is 0. select returns after 2 seconds because the poll_timer > fires. Sorry, I don't understand: select waits for up to 2 seconds because that's what we ask it to do, and those 2 sec do come from x-selection-timeout. If x-selection-timeout is zero, select is not supposed to wait at all, so why does it? What am I missing? > On systems with SIGIO, select returns as soon as X events occur, because > SIGIO is signaled. Which X event is that? something related to Emacs and selections, or just a random event which simply happens at that time? Anyway, AFAIU, the wait is supposed to end because XTread_socket reads a SelectionNotify event, and that modifies the cell for which we wait. What I'm not sure I understand is how are we supposed to call XTread_socket when we are stuck inside select all the time? > We certainly don't want to always skip the select call, but would it make sense > to use a very short timeout for select in that case? Or maybe someone has a > better idea. Making timeout shorter might be the solution, but I'd like to understand the problem better first. Thanks.