From: Gaute B Strokkenes <gs234@cam.ac.uk>
Subject: Re: nnimap versus tls
Date: Thu, 10 Jul 2003 01:03:50 +0100 [thread overview]
Message-ID: <87isqbgsd5.fsf@cam.ac.uk> (raw)
In-Reply-To: <84wuer8ovk.fsf@lucy.is.informatik.uni-duisburg.de> (Kai =?iso-2022-jp-2?b?R3JvGy5BG05fam9oYW5uJ3M=?= message of "Wed, 09 Jul 2003 21:46:23 +0200")
On 9 jul 2003, kai.grossjohann@gmx.net wrote:
> Gaute B Strokkenes <gs234@cam.ac.uk> writes:
>
>> However, the fix as it stands is not complete. Consider the
>> following (parital) backtrace:
>>
>> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>> imap-arrival-filter(#<process imap<1>> "*** Received corrupted data(-9) - server has terminated the connection abnormally\n")
>> delete-process(#<process imap<2>>)
>> imap-close(#<buffer *imap source*>)
>>
>> See? gnutls-cli likes to spit out that line "*** Received
>> corrupted"... after the connection is closed. If emacs (and thus
>> imap-arrival-filter) receives that line separately from the
>> previous one, then there is a chance that that lone line will still
>> be awaiting processing after imap-close returns, and so we loose.
>
> Argh. What happens with (while (accept-process-output ...))? That
> means we keep reading stuff until it's enough.
The thing is, the a subprocess is allowed to give us its output in
however small or large pieces that it feels like, timed in whatever
fashion it fells like. gnutls-cli seems to like to feed us things
line-by-line; thus the scenario is eminently possible:
gnutls-cli feeds us "6 OK LOGOUT completed"
we read "6 OK LOGOUT completed" with accept-process-output, which
returns non-nil.
Since it returned non-nil, we call accept-process-output again, which
returns nil.
gnutls-cli feeds us "*** Received corrupted data blah-blah", and then
dies.
We check (process-status imap-process) and find that it is dead, and
so return immediately.
Using such a loop would probably make the problem much less likely to
occur, but it _could_ still happen. And anyway, since it's easy to do
the right thing in all cases, there is no reason not do.
> Probably you already tried it, though.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
I left my WALLET in the BATHROOM!!
next prev parent reply other threads:[~2003-07-10 0:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-19 13:32 Gaute B Strokkenes
2003-07-02 23:46 ` Gaute B Strokkenes
2003-07-04 18:24 ` Kai Großjohann
2003-07-05 8:44 ` Gaute B Strokkenes
2003-07-05 12:53 ` Kai Großjohann
2003-07-06 12:56 ` Gaute B Strokkenes
2003-07-06 15:54 ` Kai Großjohann
2003-07-06 21:53 ` Gaute B Strokkenes
2003-07-07 6:08 ` Kai Großjohann
2003-07-07 7:26 ` Gaute B Strokkenes
2003-07-07 9:46 ` Gaute B Strokkenes
2003-07-07 15:35 ` Kai Großjohann
2003-07-08 22:20 ` Gaute B Strokkenes
2003-07-09 19:46 ` Kai Großjohann
2003-07-10 0:03 ` Gaute B Strokkenes [this message]
2003-07-09 19:52 ` Kai Großjohann
2003-07-10 1:25 ` Gaute B Strokkenes
2003-07-10 7:24 ` Kai Großjohann
2003-07-10 10:32 ` Gaute B Strokkenes
2003-07-10 7:49 ` Simon Josefsson
2003-07-10 11:42 ` Gaute B Strokkenes
2003-07-10 12:13 ` Simon Josefsson
2003-07-10 13:16 ` Matthias Andree
2003-07-07 15:38 ` Kai Großjohann
2003-07-07 19:37 ` Gaute B Strokkenes
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87isqbgsd5.fsf@cam.ac.uk \
--to=gs234@cam.ac.uk \
/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.
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 NNTP newsgroup(s).