From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alain Schneble Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Mon, 15 Feb 2016 17:40:12 +0100 Message-ID: <8637su53mb.fsf@realize.ch> References: <861t8nmxlj.fsf@realize.ch> <87y4auiurw.fsf@gnus.org> <86k2me8dee.fsf@realize.ch> <83a8n9ddk5.fsf@gnu.org> <864mdh8vj5.fsf@realize.ch> <87pow579kt.fsf@gnus.org> <86ziv87st0.fsf@realize.ch> <87vb5u4qtq.fsf@gnus.org> <86egci6xvk.fsf@realize.ch> <87twldgsrv.fsf@gnus.org> <8637sw7w4m.fsf@realize.ch> <87vb5sdod6.fsf@gnus.org> <83lh6nzvfp.fsf@gnu.org> <87fuwv6ai4.fsf@gnus.org> <86oabi6dts.fsf@realize.ch> <87wpq68u4d.fsf@gnus.org> <83lh6mxn5j.fsf@gnu.org> <86bn7i5j1v.fsf@realize.ch> <83fuwuxevw.fsf@gnu.org> <867fi6581k.fsf@realize.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1455554478 7178 80.91.229.3 (15 Feb 2016 16:41:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2016 16:41:18 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 15 17:41:13 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aVMD1-0003ry-06 for ged-emacs-devel@m.gmane.org; Mon, 15 Feb 2016 17:41:11 +0100 Original-Received: from localhost ([::1]:33904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVMCw-0001Tv-PY for ged-emacs-devel@m.gmane.org; Mon, 15 Feb 2016 11:41:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVMCr-0001Qk-NZ for emacs-devel@gnu.org; Mon, 15 Feb 2016 11:41:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVMCq-00054d-N0 for emacs-devel@gnu.org; Mon, 15 Feb 2016 11:41:01 -0500 Original-Received: from clientmail.realize.ch ([46.140.89.53]:3821) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aVMCm-00050q-LP; Mon, 15 Feb 2016 11:40:56 -0500 Original-Received: from rintintin.hq.realize.ch.lan.rit ([192.168.0.105]) by clientmail.realize.ch ; Mon, 15 Feb 2016 17:40:39 +0100 Original-Received: from MYNGB (192.168.66.64) by rintintin.hq.realize.ch.lan.rit (192.168.0.105) with Microsoft SMTP Server (TLS) id 15.0.516.32; Mon, 15 Feb 2016 17:40:09 +0100 In-Reply-To: <867fi6581k.fsf@realize.ch> (Alain Schneble's message of "Mon, 15 Feb 2016 16:04:39 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-ClientProxiedBy: rintintin.hq.realize.ch.lan.rit (192.168.0.105) To rintintin.hq.realize.ch.lan.rit (192.168.0.105) X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] X-Received-From: 46.140.89.53 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199977 Archived-At: --=-=-= Content-Type: text/plain Alain Schneble writes: > Eli Zaretskii 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-Turn-set-process-window-size-into-a-no-op-for-networ.patch" Content-Description: Patch >From 0d46caf4c7de7bdce3c82e9f620762dea43fd062 Mon Sep 17 00:00:00 2001 From: Alain Schneble 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 --=-=-=--