1

A process called pdflatex.exe is using 30% of my CPU, even though I'm not currently using LaTeX and don't even have VSCode open (which is what I use to edit .tex files). I can see the process through the Task Manager, but I've no idea how to stop the program (other than just killing the process which is almost never a good idea).

It doesn't seem like this has been asked here before. Is there a command for this? I don't have anything in my notification area or the taskbar that I could right click and close.

epR8GaYuh
  • 2,432
  • 1
    Which operating system are you on? Which tools does it provide to kill runaway processes? Which TeX distribution is installed on your system? Is VSCode a front-end to your TeX distribution? Why do you believe that it's not a good idea to kill a process that you are sure shouldn't be running? – Mico Apr 03 '20 at 04:02
  • Unless VSCode has a button to stop compilation (as some TeX editors do), I think your only chance is to kill the process. In theory this should not result in anything particularly bad happening other than (possibly) a botched set of auxiliary files (.aux, .toc, .lof, ...) and a (possibly) incomplete output file (.pdf, .dvi) that you can just remove before the next run. But of course it is always a good idea to have backups of your important documents. – moewe Apr 03 '20 at 04:02
  • That said, I guess you can construct situations where killing a process in the middle of something could result in undesirable outcomes (if you kill TeX during format creation maybe?). But in those cases I highly doubt that you can achieve another (less undersiable) outcome by not killing the process if it is clear that the process hangs/loops already. – moewe Apr 03 '20 at 04:08
  • 6
    You can kill the pdflatex.exe without having to worry. If it hangs indefinitely it won't produce a meaningful output PDF anyway, so you don't lose anything by just nuking it. – Henri Menke Apr 03 '20 at 04:09
  • 3
    Kill it! Stay calm, we will not tell anyone. – Fran Apr 03 '20 at 06:24
  • 1
    @Mico it's Windows 10. I use the Latex Workshop extension in VSCode which uses a Texlive distribution I have somewhere on the harddrive. I believe it's not a good idea because processes are not meant to be killed. If a process were meant to be killed, the dev would provide a way to do it from within the program (eg an Exit button). They often have dependencies, and closing them can lead to future instability and borked installs. But I still killed it :) – gargoylebident Apr 03 '20 at 06:33
  • 1
    Then the task manager would make no sense? This the exit button! Programs with GUI and exit buttons must be also euthanized sometimes. Moreover, it will be difficult to implement that button without a GUI. The compiler could make a PDF and exit, show an error and exit, ... or ask something in the system prompt and wait (a problem if some front-end allow that, but not a way to answer, right?) , ... or even crash as any other program and become a zombie process. What do do then? – Fran Apr 03 '20 at 11:19
  • 2
    @stackexchange_account1111 kill it from the task manager. it is a commandline application so it has no "buttons" normally you can use control-c to interrupt it and then x to quit cleanly but if vscode has run it at the background and so if it has lost control of that process the task manager or equivalent is the only option (and it is pretty safe tex does not have multiple things open, the worst that will happen is that you trash the pdf that is half written, – David Carlisle Apr 03 '20 at 13:06

0 Answers0