From d399ca03c0d91da7ad2aa70e76284a13c49d453d Mon Sep 17 00:00:00 2001 From: Jim Porter 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: * lisp/frame.el (make-frame): Override the 'display' parameter in batch sessions. --- lisp/frame.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/frame.el b/lisp/frame.el index b820d5fcd96..03cbd26ca0a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -871,6 +871,10 @@ make-frame frame the selected frame. However, the window system may select the new frame according to its own rules." (interactive) + ;; When running in a batch session, we can't create a GUI frame. + (when noninteractive + (push '(display . nil) parameters)) + (let* ((display (cdr (assq 'display parameters))) (w (cond ((assq 'terminal parameters) -- 2.25.1