On Wed, May 4, 2022 at 12:37 PM Jérôme LAURENS <jerome.laurens@u-bourgogne.fr> wrote:
How do you manage \jobname-<tmpname> when the process has been killed ?

Indeed, this is the problem.
In bash, quotes are already used to escape spaces in file paths such that  ‘(‘ and ‘)’ should already be escaped for free.

sure,  indeed ls 'foo.pdf(busy)' is ok while
ls foo.pdf(busy)
it is not -- a useless complication if one has to manage files at command line.
Just avoid '(' etc, e.g.  foo.pdf_busy_  is fine.