[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/async-dns e4324bd 1/4: Don't block in set-process-
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] feature/async-dns e4324bd 1/4: Don't block in set-process-window-size |
Date: |
Tue, 16 Feb 2016 02:38:05 +0000 |
branch: feature/async-dns
commit e4324bdf565fd934afa7558d4356f040d3a66c6e
Author: Alain Schneble <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Don't block in set-process-window-size
* src/process.c (set-process-window-size): Explicitly return Qnil when
called with network processes as set_window_size won't work anyway on
socket fds. As a welcome side effect, this makes the blocking
wait_for_socket_fds call obsolete.
---
src/process.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/process.c b/src/process.c
index 7783783..9c09aee 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1115,14 +1115,12 @@ DEFUN ("set-process-window-size",
Fset_process_window_size,
{
CHECK_PROCESS (process);
- if (NETCONN_P (process))
- wait_for_socket_fds (process, "set-process-window-size");
-
/* All known platforms store window sizes as 'unsigned short'. */
CHECK_RANGED_INTEGER (height, 0, USHRT_MAX);
CHECK_RANGED_INTEGER (width, 0, USHRT_MAX);
- if (XPROCESS (process)->infd < 0
+ if (NETCONN_P (process)
+ || XPROCESS (process)->infd < 0
|| (set_window_size (XPROCESS (process)->infd,
XINT (height), XINT (width))
< 0))