>>>> "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?
Still don't know how to do that, but here is what I did. Sorry, no
patch right now.
At the end of smtpmail-via-smtp, replace all of the lines at the end
starting at (delete-process process) with
(set-process-sentinel process 'smtpmail-process-sentinel)
And add the function
(defun smtpmail-process-sentinel (process event)
(message event)
(delete-process process)
(unless smtpmail-debug-info
(kill-buffer process-buffer)))
I suppose I should check that event is the expected one, but I didn't.
In any case, with this change, the byte-compiled version has been
working for me just fine. I no longer get messages about not being
able to delete the process and messages are sent as expected.
Ray
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta