Subject: bug#55056: [PATCH] Delete temporary Flymake Elisp files

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 22 Apr 2022 13:43:38 +0200

Philip Kaludercic <[email-masked]> writes:

> The below patch adds a check to the sentinel to do so.  I was a bit
> paranoid and considered more process-states that might be necessary, but
> I hope that someone with a better understanding of the process interface
> will be able to help here.

[...]

> +          (when (memq (process-status proc) '(failed closed signal))
> +            (message "Elisp flymake [%s]: %S" (buffer-file-name) (process-status proc))
> +            (ignore-errors (delete-file temp-file))
> +            (kill-buffer output-buffer)))

I'm not very familiar with the flymake machinery, but isn't the problem
a bit further up?  That is:

        :sentinel
        (lambda (proc _event)
          (when (eq (process-status proc) 'exit)

Shouldn't that just be (unless (process-live-p proc) ...)?

Perhaps João has a comment; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no