[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with the url package on w32?

From: Magnus Henoch
Subject: Re: Problems with the url package on w32?
Date: Thu, 30 Nov 2006 00:57:21 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (berkeley-unix)

Mathias Dahl <address@hidden> writes:

>> Does (make-network-process :name "http" :buffer "http-localhost"
>>                            :host "" :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?

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
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]