emacs-devel
[Top][All Lists]
Advanced

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

url-retrieve-synchronously infloops


From: Katsumi Yamaoka
Subject: url-retrieve-synchronously infloops
Date: Mon, 18 Apr 2005 21:27:56 +0900
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Hi,

For some time past, I noticed that `url-retrieve-synchronously'
sometimes gets into the infinite loop when retrieving the web
contents.  In that case, that function asynchronously calls
`url-http' by way of `url-retrieve' with the callback function
which should terminate the retrieval.  However, the callback
function is never called for certain urls.  For example, the
following form always gets hung up.

(url-insert-file-contents "http://feeds.feedburner.com/WikinewsLatestNews";)

Actually, such forms are used by nnrss which is one of the Gnus
back ends, and several people reported a similar problem.
Although I couldn't find the cause from which the process
sentinel or the process filter that run the callback function
was not executed, I saw the process had finished and the web
contents had been retrieved into the buffer.  I'm not sure
whether it is concerned, but I'm normally behind the firewall
(i.e., the http proxy server).

I made the patch for the problem.  I appreciate someone looking
into it.

*** url.el~     Thu Jan 13 21:53:13 2005
--- url.el      Mon Apr 18 12:23:03 2005
***************
*** 185,194 ****
          ;; interrupt it before it got a chance to handle process input.
          ;; `sleep-for' was tried but it lead to other forms of
          ;; hanging.  --Stef
!         (unless (accept-process-output proc)
!           ;; accept-process-output returned nil, maybe because the process
!           ;; exited (and may have been replaced with another).
!           (setq proc (get-buffer-process asynch-buffer)))))
        asynch-buffer)))
  
  (defun url-mm-callback (&rest ignored)
--- 185,196 ----
          ;; interrupt it before it got a chance to handle process input.
          ;; `sleep-for' was tried but it lead to other forms of
          ;; hanging.  --Stef
!         (if (memq (process-status proc) '(open run))
!             (unless (accept-process-output proc)
!               ;; accept-process-output returned nil, maybe because the
!               ;; process exited (and may have been replaced with another).
!               (setq proc (get-buffer-process asynch-buffer)))
!           (setq retrieval-done t))))
        asynch-buffer)))
  
  (defun url-mm-callback (&rest ignored)

Best regards,




reply via email to

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