From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Feature suggestion: server sockets Date: Mon, 18 Feb 2002 23:36:44 -0700 (MST) Message-ID: <200202190636.g1J6aig15593@santafe.santafe.edu> References: <200202162352.AAA23847@xaital.online-marketwatch.com> Reply-To: rms@gnu.org NNTP-Posting-Host: quimby2.netfonds.no X-Trace: quimby2.netfonds.no 1014101597 1535 195.204.10.66 (19 Feb 2002 06:53:17 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 19 Feb 2002 06:53:17 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16d49N-0000OZ-00 for ; Tue, 19 Feb 2002 07:53:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16d3vk-0000Ly-00; Tue, 19 Feb 2002 01:39:12 -0500 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16d3tN-0008Td-00; Tue, 19 Feb 2002 01:36:46 -0500 Original-Received: from santafe.santafe.edu (santafe [192.12.12.2]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g1J6alu27660; Mon, 18 Feb 2002 23:36:47 -0700 (MST) Original-Received: (from rms@localhost) by santafe.santafe.edu (8.10.2+Sun/8.9.3) id g1J6aig15593; Mon, 18 Feb 2002 23:36:44 -0700 (MST) X-Authentication-Warning: santafe.santafe.edu: rms set sender to rms@santafe using -f Original-To: helmut@212186011228.11.tuwien.teleweb.at In-reply-to: <200202162352.AAA23847@xaital.online-marketwatch.com> (message from Helmut Eller on Sun, 17 Feb 2002 00:52:11 +0100) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1303 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1303 This is a useful feature, and a clean Lisp interface. I see a couple of possible gaps in the implementation, though. Doing this from Emacs itself is cleaner than running an actual subprocess like emacsserver to do the job. But the subprocess runs all the time, in parallel with Emacs, while this code seems to be able to accept a server connection only inside wait_reading_process_input. If Emacs is running a Lisp program for a long time, it may go for a long time without ever calling wait_reading_process_input. This could conceivably mean that Emacs takes too long to respond and the request fails. Can you make connection acceptance happen in response to a signal such as SIGIO, or make it happen in an alarm that happens frequently? (Such as the one used to poll for available terminal input.) The actual running of the filter function would have to wait until wait_reading_process_input, of course. Something like this already happens with sentinels, I recall. One other point: this seems to be designed to work with PF_INET sockets only. If you look at emacsclient, you'll see it uses either a PF_UNIX socket or SYSVIPC. To make server sockets replace emacsserver, they would have to support both PF_UNIX sockets and SYSVIPC (unless SYSVIPC is obsolete nowadays and all systems support sockets). _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel