unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: tomga@wp.pl
Cc: emacs-devel@gnu.org
Subject: Re: Infinite loop in pop3-retr
Date: Thu, 26 May 2011 21:35:34 -0300	[thread overview]
Message-ID: <jwvaae9asmm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4dde12c597bf00.88976681@wp.pl> (tomga@wp.pl's message of "Thu, 26 May 2011 10:43:49 +0200")

> Sometimes during retrieving mail through pop3 in gnus I emacs loops infinitely in pop3-retr. It seems to be somehow connected with some buggy mail. Normally I didn't have time to investigate it thoroughly (I haven't used emacs debugger yet) but this time I think I've found out enough to make this problem fixed by someone.
> Problem is inside:
>       (set-buffer (process-buffer process))
>       (while (not (re-search-forward "^\\.\r\n" nil t))
> 	(pop3-accept-process-output process)
> 	(goto-char start))

> If I correctly read it this code assumes that in (process-buffer
> process) finally will contain line with dot only but this never
> happens probably due to information found at the end of trace of pop
> session to server saying:

> Process POP connection broken by remote peer.

> Can you propose some fix for this?

The while should also test whether the `process' is still alive.  Or else,
pop3-accept-process-output should somehow signal an error if `process' is
not alive any more.


        Stefan



  reply	other threads:[~2011-05-27  0:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  8:43 Infinite loop in pop3-retr tomga
2011-05-27  0:35 ` Stefan Monnier [this message]
2011-05-27  9:33   ` Tomasz Gajewski
2011-05-27 12:55     ` Stefan Monnier
2011-05-30 17:21       ` Lars Magne Ingebrigtsen
2011-05-31  1:12         ` Stefan Monnier
2011-05-31 18:22           ` Lars Magne Ingebrigtsen
2011-05-31 21:45             ` Stefan Monnier
2011-06-01 11:48               ` Lars Magne Ingebrigtsen
2011-06-12 22:43                 ` Chong Yidong
2011-06-14 14:58                   ` Lars Magne Ingebrigtsen
2011-05-30 17:18     ` Lars Magne Ingebrigtsen
2011-05-31  6:36       ` Tomasz Gajewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvaae9asmm.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=tomga@wp.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).