diff options
| author | Eli Zaretskii | 2017-04-17 09:47:39 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-04-17 09:47:39 +0300 |
| commit | edc63bf94f3cd3f52fab86fe7b92a3ec6a19de40 (patch) | |
| tree | 09e341c10ebb6625a16a4c038bd12360819e6b64 /src/process.c | |
| parent | 47122295521c63febe9fc64680430812da3a3acf (diff) | |
| download | emacs-edc63bf94f3cd3f52fab86fe7b92a3ec6a19de40.tar.gz emacs-edc63bf94f3cd3f52fab86fe7b92a3ec6a19de40.zip | |
Fix assertion violations when displaying thread-related error
* src/process.c (Faccept_process_output): Don't assume a thread's
name is always a string.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 2f2e5c1b251..b81c7b459e3 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4563,8 +4563,16 @@ is nil, from any process) before the timeout expired. */) | |||
| 4563 | /* Can't wait for a process that is dedicated to a different | 4563 | /* Can't wait for a process that is dedicated to a different |
| 4564 | thread. */ | 4564 | thread. */ |
| 4565 | if (!EQ (proc->thread, Qnil) && !EQ (proc->thread, Fcurrent_thread ())) | 4565 | if (!EQ (proc->thread, Qnil) && !EQ (proc->thread, Fcurrent_thread ())) |
| 4566 | error ("Attempt to accept output from process %s locked to thread %s", | 4566 | { |
| 4567 | SDATA (proc->name), SDATA (XTHREAD (proc->thread)->name)); | 4567 | Lisp_Object proc_thread_name = XTHREAD (proc->thread)->name; |
| 4568 | |||
| 4569 | if (STRINGP (proc_thread_name)) | ||
| 4570 | error ("Attempt to accept output from process %s locked to thread %s", | ||
| 4571 | SDATA (proc->name), SDATA (proc_thread_name)); | ||
| 4572 | else | ||
| 4573 | error ("Attempt to accept output from process %s locked to thread %p", | ||
| 4574 | SDATA (proc->name), XTHREAD (proc->thread)); | ||
| 4575 | } | ||
| 4568 | } | 4576 | } |
| 4569 | else | 4577 | else |
| 4570 | just_this_one = Qnil; | 4578 | just_this_one = Qnil; |