From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#23615: 25.1.50; Which platforms can safely use getsockopt(,,SO_ERROR,,)? Date: Thu, 2 Jun 2016 13:55:14 -0400 Message-ID: <94329b2c-754f-c674-daa9-362284862220@cornell.edu> References: <3383267a-8631-a2a3-7914-ee54e68b1b07@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1464890190 32112 80.91.229.3 (2 Jun 2016 17:56:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 17:56:30 +0000 (UTC) Cc: 23615@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 19:56:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1b8Wqv-0002z6-21 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 19:56:17 +0200 Original-Received: from localhost ([::1]:49588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Wqr-0005KU-6G for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 13:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Wql-0005Jx-9a for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 13:56:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8Wqg-0005F9-9t for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 13:56:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Wqg-0005F3-6A for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 13:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b8Wqf-0005Eb-OK for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2016 13:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jun 2016 17:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23615 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23615-submit@debbugs.gnu.org id=B23615.146489012220064 (code B ref 23615); Thu, 02 Jun 2016 17:56:01 +0000 Original-Received: (at 23615) by debbugs.gnu.org; 2 Jun 2016 17:55:22 +0000 Original-Received: from localhost ([127.0.0.1]:52000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8Wq1-0005DY-M6 for submit@debbugs.gnu.org; Thu, 02 Jun 2016 13:55:21 -0400 Original-Received: from limerock04.mail.cornell.edu ([128.84.13.244]:49831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8Wq0-0005DM-H1 for 23615@debbugs.gnu.org; Thu, 02 Jun 2016 13:55:20 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u52HtCKF006635; Thu, 2 Jun 2016 13:55:13 -0400 Original-Received: from [192.168.1.5] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u52HtB4M029805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 2 Jun 2016 13:55:12 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: X-PMX-Cornell-Gauge: Gauge=XXXXX X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118991 Archived-At: On 6/2/2016 1:17 PM, Ken Brown wrote: > On 6/2/2016 12:00 PM, Paul Eggert wrote: >> On Solaris 10 on a host with only IPv4 configured, socket_test.c fails >> with the diagnostic "Can't start server." 'truss' says connect(3, >> 0x00021EE8, 16, SOV_DEFAULT) failed with errno == EOPNOTSUPP. >> >> On Solaris 11 with both IPv4 and IPv6, the same symptoms except errno == >> EADDRNOTAVAIL. > > Thanks for testing. This means that my test program is not portable > enough to answer the question in the subject; the failure occurred > before the program reached the getsockopt call. I'll see if I can fix > that. I wonder if the problem was calling 'connect' after calling 'listen'. Eli pointed out that this doesn't work on MS-Windows, and in any case I can't see why it would ever be needed. (I only did it because the code in process.c that I was imitating did it.) Does the following help? --- socket_test.c~ 2016-05-25 21:27:46.000000000 -0400 +++ socket_test.c 2016-06-02 13:47:52.719883900 -0400 @@ -122,6 +122,7 @@ return -1; } *pservice = ntohs (sa.sin_port); + ret = 0; } else /* Nonblocking client. */ @@ -132,8 +133,8 @@ s = -1; continue; } + ret = connect (s, rp->ai_addr, rp->ai_addrlen); } - ret = connect (s, rp->ai_addr, rp->ai_addrlen); if (ret == 0 || errno == EISCONN) break; if (!server && errno == EINPROGRESS)