diff options
| author | Alain Schneble | 2016-02-16 13:13:06 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-16 13:13:06 +1100 |
| commit | e4324bdf565fd934afa7558d4356f040d3a66c6e (patch) | |
| tree | 0c9bc68870279be5f41bb83d189eff49ed68623f /src/process.c | |
| parent | 7f3441cc3335b5faf7cb52458256dbbbaaaf9fa7 (diff) | |
| download | emacs-e4324bdf565fd934afa7558d4356f040d3a66c6e.tar.gz emacs-e4324bdf565fd934afa7558d4356f040d3a66c6e.zip | |
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.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c index 77837834916..9c09aeefa6b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1115,14 +1115,12 @@ DEFUN ("set-process-window-size", Fset_process_window_size, | |||
| 1115 | { | 1115 | { |
| 1116 | CHECK_PROCESS (process); | 1116 | CHECK_PROCESS (process); |
| 1117 | 1117 | ||
| 1118 | if (NETCONN_P (process)) | ||
| 1119 | wait_for_socket_fds (process, "set-process-window-size"); | ||
| 1120 | |||
| 1121 | /* All known platforms store window sizes as 'unsigned short'. */ | 1118 | /* All known platforms store window sizes as 'unsigned short'. */ |
| 1122 | CHECK_RANGED_INTEGER (height, 0, USHRT_MAX); | 1119 | CHECK_RANGED_INTEGER (height, 0, USHRT_MAX); |
| 1123 | CHECK_RANGED_INTEGER (width, 0, USHRT_MAX); | 1120 | CHECK_RANGED_INTEGER (width, 0, USHRT_MAX); |
| 1124 | 1121 | ||
| 1125 | if (XPROCESS (process)->infd < 0 | 1122 | if (NETCONN_P (process) |
| 1123 | || XPROCESS (process)->infd < 0 | ||
| 1126 | || (set_window_size (XPROCESS (process)->infd, | 1124 | || (set_window_size (XPROCESS (process)->infd, |
| 1127 | XINT (height), XINT (width)) | 1125 | XINT (height), XINT (width)) |
| 1128 | < 0)) | 1126 | < 0)) |