From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Magnus Henoch Newsgroups: gmane.emacs.devel Subject: Re: Problems with the url package on w32? Date: Sat, 02 Dec 2006 12:37:18 +0100 Message-ID: <871wniv89d.fsf@freemail.hu> References: <871wnnclkz.fsf@freemail.hu> <87lkltztzy.fsf@freemail.hu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165059488 25067 80.91.229.2 (2 Dec 2006 11:38:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2006 11:38:08 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 02 12:38:05 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GqTBx-0000U4-3E for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2006 12:38:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqTBw-0007p4-M5 for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2006 06:38:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GqTBf-0007mx-W0 for emacs-devel@gnu.org; Sat, 02 Dec 2006 06:37:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GqTBc-0007h1-1Q for emacs-devel@gnu.org; Sat, 02 Dec 2006 06:37:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqTBb-0007gs-UK for emacs-devel@gnu.org; Sat, 02 Dec 2006 06:37:39 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GqTBb-0002Ex-IA for emacs-devel@gnu.org; Sat, 02 Dec 2006 06:37:39 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GqTBT-0000NG-QN for emacs-devel@gnu.org; Sat, 02 Dec 2006 12:37:32 +0100 Original-Received: from etthundrat.olf.sgsnet.se ([193.11.222.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Dec 2006 12:37:31 +0100 Original-Received: from mange by etthundrat.olf.sgsnet.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Dec 2006 12:37:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 41 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: etthundrat.olf.sgsnet.se Mail-Copies-To: never Jabber-Id: legoscia@jabber.cd.chalmers.se User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (berkeley-unix) Cancel-Lock: sha1:NiGzRwVEpTiY2SUoVR1Bc+aY/2Y= 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:63220 Archived-At: Does anyone know what to do about this? > Mathias Dahl writes: > >>> Does (make-network-process :name "http" :buffer "http-localhost" >>> :host "127.0.0.1" :service 80 >>> :nowait t) >>> work? >> >> I get no error but it returns `nil'. I guess it should return a >> process object, right? > > Yes. Does it work with hosts other than localhost? [ it doesn't ] > The direct cause of the `nil' return value is this code in process.c: > > if (s < 0) > { > /* If non-blocking got this far - and failed - assume non-blocking is > not supported after all. This is probably a wrong assumption, but > the normal blocking calls to open-network-stream handles this error > better. */ > if (is_non_blocking_client) > return Qnil; > > This seems to be a bug of some sort. The documentation doesn't > mention that make-network-process might ever return nil. I see four > possible solutions; someone who knows Windows should look at this. > > 1. Make non-blocking connections work on Windows. > 2. Make (featurep 'make-network-process '(:nowait t)) return nil on > Windows. > 3. Document that make-network-process returns nil if it fails to > create a non-blocking socket. > 4. Make make-network-socket do a blocking connect if a non-blocking > connect fails, and document that. > > Magnus