all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* url-retrieve-synchronously infloops
@ 2005-04-18 12:27 Katsumi Yamaoka
  2005-04-18 13:21 ` Stefan Monnier
  2005-04-18 21:06 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-04-18 12:27 UTC (permalink / raw)


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,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-18 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 12:27 url-retrieve-synchronously infloops Katsumi Yamaoka
2005-04-18 13:21 ` Stefan Monnier
2005-04-18 15:23   ` Katsumi Yamaoka
2005-04-18 21:06 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.