Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tried to compile a file, and LaTeX didn't like something (I have no idea what). Now, when I try to compile, I am told that "The process cannot access the file because it is being used by another process." So apparently, TeX is still trying to compile the file or something. As best as I can tell, the problem is that a synctex.gz file is still (busy). How do I kill this process?

share|improve this question
    
Could you tell a little bit more what operating system you use etc? Most generic method is a reboot of your computer ;) but if it is not a process but a locked file instead that might not solve your problem entirely. –  hugovdberg Mar 29 at 1:04
1  
In windows, hit CTL-ALT-DEL, and start the task manager. Kill the process named pdflatex.exe. Then close the task manager. –  Steven B. Segletes Mar 29 at 1:04
    
In WinEdt, under Windows, just click on the "x" button at the upper right corner of WinEdt console. There's also a keyboard shortcut, but I can't rember it at the moment. –  Bernard Mar 29 at 1:26
    
Another unclear version of this question: tex.stackexchange.com/questions/136226/… –  alfC Mar 29 at 2:02

3 Answers 3

If you are running Linux, you can run $ lsof synctex.gz to find which process has the file open, and then kill it.

share|improve this answer

Steven B. Segletes posted a partly correct response.

You need to kill pdflatex, but then you should also delete the file "xxx.synctex.gz(busy)".

However, be aware that this just helps remove the file "xxx.synctex.gz(busy)". In my experience, this error occurs because of an error in your tex code, so if you successfully remove the file, and then try compiling again, you will probably have to go through the process all over again.

A lot of confusion comes from the fact that, after you kill pdflatex from the Task Manager, your file browser might still say "xxx.synctex.gz(busy)". In fact the file is no longer busy, and you should be free to delete it.

Here is why:

The synctex.gz file is a reverse lookup file, which enables you to click on a place in the pdf, and then have your .tex editor move your cursor to the place in the .tex file which generated that point in the pdf.

While pdflatex is generating this file, it literally gives the file the name "xxx.synctex.gz(busy)", and then actually locks it to prevent you from accessing it. Therefore your file browser will show you "xxx.synctex.gz(busy)", regardless of whether or not the file is actually locked.

When pdflatex is finished, it renames the file from "xxx.synctex.gz(busy)" to "xxx.synctex.gz".

share|improve this answer

I encountered the same problem in Windows 7 running pdfLaTeX with TeXworks (MiKTeX 2.9). The lingering "xxx.synctex.gz(busy)" started when I lost connection to the remote server where my .tex file directories were supposedly synced to be "Always available offline".

Upon restoring the connection to the remote server, or copying the whole directory back to a local drive, I was able to run pdfLaTeX again and it compiled completely, automatically renaming the synctex.gz file properly and removing the (busy) version.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.