From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: smtpmail.el and 1msg Date: Thu, 11 Mar 2004 00:11:56 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <16455.40870.198614.821339@freezer.sbum.org> <16463.23363.546305.750102@freezer.sbum.org> <16463.40766.614760.193678@freezer.sbum.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079059021 12579 80.91.224.253 (12 Mar 2004 02:37:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Mar 2004 02:37:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 12 03:36:55 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1cXf-0003AK-00 for ; Fri, 12 Mar 2004 03:36:55 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1cXf-0007ih-00 for ; Fri, 12 Mar 2004 03:36:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1cBA-0007FM-Ba for emacs-devel@quimby.gnus.org; Thu, 11 Mar 2004 21:13:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B1CsX-0004Zt-GP for emacs-devel@gnu.org; Wed, 10 Mar 2004 18:12:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B1Crx-0004Hb-Cl for emacs-devel@gnu.org; Wed, 10 Mar 2004 18:12:41 -0500 Original-Received: from [217.13.230.178] (helo=yxa.extundo.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1B1Crw-0004Fo-5r for emacs-devel@gnu.org; Wed, 10 Mar 2004 18:12:08 -0500 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.11/8.12.11) with ESMTP id i2ANBwLL017898 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 11 Mar 2004 00:12:00 +0100 Original-To: jglauner@sbum.org X-Hashcash: 0:040310:jglauner@sbum.org:ec77f46345868014 X-Hashcash: 0:040310:emacs-devel@gnu.org:f0ce463f338c19d3 In-Reply-To: <16463.40766.614760.193678@freezer.sbum.org> (Jonathan Glauner's message of "Wed, 10 Mar 2004 17:05:34 -0600") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20329 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20329 Jonathan Glauner writes: > > Does this patch help? If not, can you pinpoint exactly > > where does smtpmail.el hang, using (setq debug-on-quit t) and > > pressing C-g when it spins? > > The patch didn't help, and here's the backtrace from C-g: > > --SNIP-- > > Debugger entered--Lisp error: (quit) > accept-process-output(#) > smtpmail-read-response(#) How about this, then? It add a timeout to the accept-process-output call. I thought accept-process-output was supposed to return if the process died, though. Are you using Windows or Macintosh? I recall some process related problems on those systems. --- smtpmail.el.~1.65.~ 2004-02-11 13:34:59.000000000 +0100 +++ smtpmail.el 2004-03-11 00:10:33.000000000 +0100 @@ -1,6 +1,6 @@ ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail -;; Copyright (C) 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Tomoji Kagatani ;; Maintainer: Simon Josefsson @@ -778,11 +778,13 @@ (response-continue t) (return-value '(nil ())) match-end) - + (catch 'done (while response-continue (goto-char smtpmail-read-point) (while (not (search-forward "\r\n" nil t)) - (accept-process-output process) + (unless (memq (process-status process) '(open run)) + (throw 'done nil)) + (accept-process-output process 1) (goto-char smtpmail-read-point)) (setq match-end (point)) @@ -817,10 +819,8 @@ (setq smtpmail-read-point match-end) (setq response-continue nil) (setq return-value - (cons nil (nreverse response-strings))) - ) - ))) - (setq smtpmail-read-point match-end) + (cons nil (nreverse response-strings))))))) + (setq smtpmail-read-point match-end)) return-value))