emacs-devel
[Top][All Lists]
Advanced

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

Re: Gnus and Emacs: Several Questions


From: Herbert Euler
Subject: Re: Gnus and Emacs: Several Questions
Date: Fri, 22 Jun 2007 12:00:17 +0800

> If the definition of `pop3-accept-process-output' is as above, I get
> the attached dumped file "w32-debug-emacs.txt".  There are two blocks
> in that file, and four instances of the process buffer content, but
> only the last instance has a "+OK" line.  This line is output by
> `gnutls-cli' only when it finishes connecting, and Gnus waits for this
> line.  If `gnutls-cli' is executed from command line, the line is
> outputed very quickly.  But if `gnutls-cli' is executed in Emacs, the
> line is not read for long, and Emacs hangs.  When I type C-g, Emacs
> stops hanging and read the line.  This is why there is a "+OK" line
> there.

Sounds like a problem with gnutls-cli on Windows I reported a while
back to a GnuTLS mailing list.  Some information can be found at
<URL:http://thread.gmane.org/87fyh52173.fsf%40latte.josefsson.org> and
<URL:http://thread.gmane.org/87mz8t455l.fsf%40latte.josefsson.org>.

Ok.  This explains my trouble with gnutls-cli.  How about the order of
reading?  Perhaps I did not describe clearly.  More precisely, there
are two points I noticed:

[1] Emacs creates a subprocess when some lisp code invokes
   `start-process'.  Emacs is the parent process, and communicates
   with the subprocess with pipes.  However, the standard output and
   the error output of the subprocess are combined into one file
   descriptor of the pipe.

[2] When invoking `accept-process-output', Emacs waits subprocesses'
   output via the system call "select".  When there are some
   operations avaliabe for the process provided to
   `accept-process-output', it returns.  However, the _order_ of the
   read content is not guaranteed to be the same as the process
   output.  It is decided by the arrival of the output.

Are the two points correct?  Now the "wrong" order seems Ok to me,
too: it's not what Emacs can control about the order of the output, so
it's the caller's responsibility to consider about it and to deal with
it.  But I wonder whether it's expected.

And why is there some content never gets read?  Please see the two
files "bsd-debug-emacs-openssl" (which is the output from console) and
"bsd-debug-emacs" (which is the output read by Emacs).  Strings such
as "BEGIN CERTIFICATE" are not read into the process buffer.  Is this
expected?

Thanks.

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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