* bug#36163: 27.0.50; `list-processes' assumes `thread-name' cannot return nil
@ 2019-06-11 7:03 Pip Cet
2019-06-11 15:26 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Pip Cet @ 2019-06-11 7:03 UTC (permalink / raw)
To: 36163
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
In emacs -Q, run:
(make-thread (lambda ()
(make-process :name "name" :command (list "/bin/sh" "-c"
"while true; do sleep 1; done"))
(while t
(thread-yield))))
Then use M-x list-processes. This results in an error as (thread-name
thread) returns nil for the thread, since the optional name argument to
make-thread hasn't been specified.
The attached patch fixes things.
diff --git a/lisp/simple.el b/lisp/simple.el
index 6bc3bc5304..cf537265bd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4102,7 +4102,8 @@ list-processes--refresh
(null (process-thread p))
(not (fboundp 'thread-name))) "--")
((eq (process-thread p) main-thread) "Main")
- ((thread-name (process-thread p)))))
+ ((thread-name (process-thread p)))
+ (t "--")))
(cmd
(if (memq type '(network serial))
(let ((contact (process-contact p t)))
[-- Attachment #2: emacs-patch.diff --]
[-- Type: text/x-patch, Size: 588 bytes --]
diff --git a/lisp/simple.el b/lisp/simple.el
index 6bc3bc5304..cf537265bd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4102,7 +4102,8 @@ list-processes--refresh
(null (process-thread p))
(not (fboundp 'thread-name))) "--")
((eq (process-thread p) main-thread) "Main")
- ((thread-name (process-thread p)))))
+ ((thread-name (process-thread p)))
+ (t "--")))
(cmd
(if (memq type '(network serial))
(let ((contact (process-contact p t)))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#36163: 27.0.50; `list-processes' assumes `thread-name' cannot return nil
2019-06-11 7:03 bug#36163: 27.0.50; `list-processes' assumes `thread-name' cannot return nil Pip Cet
@ 2019-06-11 15:26 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2019-06-11 15:26 UTC (permalink / raw)
To: Pip Cet; +Cc: 36163-done
Thanks, I installed that patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-11 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 7:03 bug#36163: 27.0.50; `list-processes' assumes `thread-name' cannot return nil Pip Cet
2019-06-11 15:26 ` Paul Eggert
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.