From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: retry_connect weirdness Date: Mon, 07 Dec 2009 13:08:09 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260188338 13030 80.91.229.12 (7 Dec 2009 12:18:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 12:18:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 07 13:18:51 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NHcY9-0000pO-TH for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2009 13:18:46 +0100 Original-Received: from localhost ([127.0.0.1]:38455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHcY9-000198-EH for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2009 07:18:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHcOS-0000ts-Ua for emacs-devel@gnu.org; Mon, 07 Dec 2009 07:08:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHcON-0000qp-L5 for emacs-devel@gnu.org; Mon, 07 Dec 2009 07:08:43 -0500 Original-Received: from [199.232.76.173] (port=56240 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHcON-0000qg-Ca for emacs-devel@gnu.org; Mon, 07 Dec 2009 07:08:39 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:54250) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHcOM-0005Eg-Uu for emacs-devel@gnu.org; Mon, 07 Dec 2009 07:08:39 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NHcOJ-00057Q-6Y for emacs-devel@gnu.org; Mon, 07 Dec 2009 13:08:35 +0100 Original-Received: from dial-177248.pool.broadband44.net ([212.46.177.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Dec 2009 13:08:35 +0100 Original-Received: from eller.helmut by dial-177248.pool.broadband44.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Dec 2009 13:08:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dial-177248.pool.broadband44.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:JPd7w5mTJh/R0Bwb3GOMFJXVgpY= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118364 Archived-At: I have some questions regarding retry_connect in Fmake_network_process. 1. if connect() is interrupted (EINTR) the socket is closed via emacs_close() and a new socket is created on the next iteration. Wouldn't it be better to retry with the same socket? I have a server that accepts exactly one connection, i.e. the server closes the listening socket after accept(). I have the suspicion that retrying with a fresh socket leads to problems, unfortunately the scenario is hard to demonstrate due to timing and interrupts etc. 2. what's the matter with those turn_on_atimers/turn_on_atimers around connect()? Why are timer interrupts allowed in other places but not during connect? It's especially odd since connect() can take so long. 3. why is EISCONN ignored? 4. am I the only who's wondering how anything can work at all with this #ifdef/#ifndef jungle? Helmut