all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rpluim@gmail.com, eggert@cs.ucla.edu, emacs-devel@gnu.org
Subject: Re: server.el test failures
Date: Fri, 3 Mar 2023 00:00:31 -0800	[thread overview]
Message-ID: <3ab787dc-2194-f983-8866-530488d4d9dd@gmail.com> (raw)
In-Reply-To: <2f012e8c-ce15-fd24-d4d5-d744a338a682@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

On 3/2/2023 11:15 PM, Jim Porter wrote:
> On 3/2/2023 11:00 PM, Eli Zaretskii wrote:
>>> Date: Thu, 2 Mar 2023 14:15:49 -0800
>>> Cc: Eli Zaretskii <eliz@gnu.org>, eggert@cs.ucla.edu, 
>>> emacs-devel@gnu.org
>>> From: Jim Porter <jporterbugs@gmail.com>
>>>
>>> Would that be safe? Since 'parameters' is an argument, we don't actually
>>> know how it was created or if modifying in-place would be ok. If it were
>>> just a regular quoted list, using 'setf' could cause problems.
>>
>> If this aspect could be an issue, perhaps it is better to implement
>> the change without touching 'parameters' at all?  It isn't hard, it
>> just might make the change less elegant and slightly larger.
> 
> Pushing onto the front of 'parameters' should be safe, in the sense that 
> after 'make-frame' returns, the caller wouldn't be able to tell that we 
> did anything to it. So long as the caller can't tell, I think it's ok.
> 
> However, there might be a better way to do this anyway; I'll think it over.

Ok, I think this is better. Now, instead of messing with 'parameters', 
when in batch mode, we just always treat the window-system as nil (i.e. 
create a terminal frame). I ran the server tests with this patch, and 
they all look good.

[-- Attachment #2: 0001-Don-t-create-GUI-frames-in-batch-sessions.patch --]
[-- Type: text/plain, Size: 1392 bytes --]

From 0c7f9f038a5b3ec27456696aaffa8f0f4042246e Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Tue, 28 Feb 2023 11:35:21 -0800
Subject: [PATCH] Don't create GUI frames in batch sessions

This resolves an issue with running test/lisp/server-tests.el when
'DISPLAY' is set: the tests would start the Emacs server in a batch
session, and then request a new GUI frame.  However, that caused the
tests to terminate with SIGIO, since a batch Emacs doesn't set a SIGIO
handler.

Ref: <https://lists.gnu.org/archive/html/emacs-devel/2023-02/msg00879.html>

* lisp/frame.el (make-frame): Always create a terminal frame in batch
sessions.
---
 lisp/frame.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/frame.el b/lisp/frame.el
index b820d5fcd96..d9255a55171 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -873,6 +873,11 @@ make-frame
   (interactive)
   (let* ((display (cdr (assq 'display parameters)))
          (w (cond
+             ;; When running in a batch session, don't create a GUI
+             ;; frame.  (Batch sessions don't set a SIGIO handler on
+             ;; relevant platforms, so attempting this would terminate
+             ;; Emacs.)
+             (noninteractive nil)
              ((assq 'terminal parameters)
               (let ((type (terminal-live-p
                            (cdr (assq 'terminal parameters)))))
-- 
2.25.1


  reply	other threads:[~2023-03-03  8:00 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 22:59 bug#9800: Incomplete truncated file buffers from the /proc filesystem Juri Linkov
2011-10-20  8:22 ` Eli Zaretskii
2011-10-20  8:44   ` Andreas Schwab
2023-02-12  7:38     ` Eli Zaretskii
2023-02-12  9:24       ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2011-10-24  2:53 ` Paul Eggert
2011-10-24 21:50   ` Richard Stallman
2011-10-24 22:02     ` Paul Eggert
2023-02-12 10:21       ` Arsen Arsenović via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-13 20:47         ` Paul Eggert
2023-02-13 21:55           ` server.el test failures (was: Re: bug#9800: Incomplete truncated file buffers from the /proc filesystem) Jim Porter
2023-02-14  2:47             ` Paul Eggert
2023-02-15  7:06               ` Jim Porter
2023-02-15 18:20                 ` Paul Eggert
2023-02-23 23:42                   ` Paul Eggert
2023-02-24  0:50                     ` Jim Porter
2023-02-24  2:20                       ` Jim Porter
2023-02-24  3:25                         ` Po Lu
2023-02-24  3:38                           ` Jim Porter
2023-02-24  7:52                         ` Eli Zaretskii
2023-02-24 17:48                           ` Jim Porter
2023-02-24 18:37                             ` Eli Zaretskii
2023-02-24 19:45                               ` Alan Mackenzie
2023-02-24 20:31                               ` Jim Porter
2023-02-24 20:47                                 ` Eli Zaretskii
2023-02-26  8:29                       ` Paul Eggert
2023-02-26  9:47                         ` Eli Zaretskii
2023-02-27  5:31                         ` Jim Porter
2023-02-27 16:40                           ` server.el test failures Robert Pluim
2023-02-27 16:50                             ` Eli Zaretskii
2023-02-27 18:14                               ` Robert Pluim
2023-02-27 18:39                                 ` Eli Zaretskii
2023-02-28  7:42                                   ` Robert Pluim
2023-02-28 12:13                                     ` Eli Zaretskii
2023-02-28 13:05                                       ` Robert Pluim
2023-02-28 19:02                                         ` Jim Porter
2023-02-28 19:23                                           ` Eli Zaretskii
2023-02-28 19:41                                             ` Jim Porter
2023-03-01  8:22                                               ` Robert Pluim
2023-03-02 22:15                                                 ` Jim Porter
2023-03-03  7:00                                                   ` Eli Zaretskii
2023-03-03  7:15                                                     ` Jim Porter
2023-03-03  8:00                                                       ` Jim Porter [this message]
2023-03-03  8:10                                                         ` Eli Zaretskii
2023-03-03 17:27                                                           ` Jim Porter
2023-03-03  8:16                                                         ` Robert Pluim
2011-11-03 20:32   ` bug#9800: Incomplete truncated file buffers from the /proc filesystem Lars Magne Ingebrigtsen
2011-11-04  9:36     ` Juri Linkov
2011-11-04 10:54       ` Eli Zaretskii
2022-02-07  0:10 ` Lars Ingebrigtsen
2022-02-07 19:41   ` Juri Linkov

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=3ab787dc-2194-f983-8866-530488d4d9dd@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@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.