* url-queue.el (url-queue-kill-job): Delete the process sentinel
before killing the process to avoid a race condition between the
two processes killing off the process buffer.
2012-02-20 Lars Ingebrigtsen <larsi@gnus.org>
+ * url-queue.el (url-queue-kill-job): Delete the process sentinel
+ before killing the process to avoid a race condition between the
+ two processes killing off the process buffer.
+
* url.el (url-retrieve-internal): Warn about file errors when
pruning the cache instead of bugging out (bug#10831).
(defun url-queue-kill-job (job)
(when (bufferp (url-queue-buffer job))
- (while (get-buffer-process (url-queue-buffer job))
- (ignore-errors
- (delete-process (get-buffer-process (url-queue-buffer job)))))
+ (let (process)
+ (while (setq process (get-buffer-process (url-queue-buffer job)))
+ (set-process-sentinel process 'ignore)
+ (ignore-errors
+ (delete-process process))))
(ignore-errors
(kill-buffer (url-queue-buffer job)))))