>>>> "Raymond" == Raymond Toy
<toy.raymond(a)gmail.com> writes:
>>>> "Raymond" == Raymond Toy
<toy.raymond(a)gmail.com> writes:
>>>>> "Stephen" ==
Stephen J Turnbull <stephen(a)xemacs.org> writes:
Stephen> Raymond Toy writes:
>>> I still get the error about being unable to delete the
process near
>>> the end of smtpmail-via-smtp. I stuck a (message "Deleteing
process")
>>> and (sit-for 1) just before (delete-process process). I don't have
>>> this problem anymore. Some kind of race condition?
Stephen> That's quite possibly the reason for byte-compiled code failing where
Stephen> interpreted code doesn't. The race condition might be aggravated by
Stephen> multicore systems, too, if smtpmail isn't properly waiting for the
Stephen> subprocess to terminate, but assumes that it will do so "fast
enough".
Raymond> What is the correct xemacs way to wait for a process to terminate?
Raymond> Still don't know how to do that, but here is what I did. Sorry, no
Raymond> patch right now.
Sorry for taking so long, but Here is a proper patch for what I've
done. I haven't had any problems with sending mail out with this
patch.
Ray
--- smtpmail.el-orig 2013-11-09 21:47:30.000000000 -0800
+++ smtpmail.el-rlt 2013-11-09 21:45:26.000000000 -0800
@@ -799,15 +799,21 @@
(with-current-buffer (process-buffer process)
(smtpmail-send-command process "QUIT")
(smtpmail-read-response process)
+
; (if (or (null (car (setq response-code (smtpmail-read-response process))))
; (not (integerp (car response-code)))
; (>= (car response-code) 400))
; (throw 'done nil)
; )
- (delete-process process)
- (unless smtpmail-debug-info
- (kill-buffer process-buffer)))))))
+ ;;(message "Delete process\n")
+ (set-process-sentinel process 'smtpmail-process-sentinel))))))
+
+(defun smtpmail-process-sentinel (process event)
+ (message event)
+ (delete-process process)
+ (unless smtpmail-debug-info
+ (kill-buffer process-buffer)))
(defun smtpmail-process-filter (process output)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta