[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous DNS
From: |
Alain Schneble |
Subject: |
Re: Asynchronous DNS |
Date: |
Mon, 15 Feb 2016 17:40:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Alain Schneble <address@hidden> writes:
> Eli Zaretskii <address@hidden> writes:
>
>> If the ioctl call issued by the implementation always fails on
>> sockets, then yes.
>
> On GNU/Linux (debian) the call to ioctl (fd, TIOCSWINSZ, &size) in
> set_window_size returns -1 if called with a socket fd and thus fails
> with errno=25 "Inappropriate ioctl for device". I guess this might be
> the case on other systems as well...
If we will all agree, here is a patch for the feature/async-dns branch
to basically turn set-process-window-size into a "no-op" when called on
network processes. And it simply makes the call to the "blocker"
function obsolete as a welcome side effect.
>From 0d46caf4c7de7bdce3c82e9f620762dea43fd062 Mon Sep 17 00:00:00 2001
From: Alain Schneble <address@hidden>
Date: Mon, 15 Feb 2016 17:03:38 +0100
Subject: [PATCH] Turn set-process-window-size into a "no-op" for network
processes
* 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 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/process.c b/src/process.c
index f1c066f..f35c88e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1115,14 +1115,11 @@ 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))
--
2.6.2.windows.1
- Re: Asynchronous DNS, (continued)
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/15
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/15
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/15
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/15
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/15
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/15
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/15
- Re: Asynchronous DNS, Alain Schneble, 2016/02/15
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/15
- Re: Asynchronous DNS, Alain Schneble, 2016/02/15
- Re: Asynchronous DNS,
Alain Schneble <=
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/15
- Re: Asynchronous DNS, Alain Schneble, 2016/02/16
- Re: Asynchronous DNS, Alain Schneble, 2016/02/15
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/12
- Re: Asynchronous DNS, Alain Schneble, 2016/02/12
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/08
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/08
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/09
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/08
- Re: Asynchronous DNS, Alain Schneble, 2016/02/08