Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Edit: I discovered that the problem is not related with the script cited below, but I'll leave it there just for history.

Well, this error appears when I close texstudio with the viewer open (xdvi or evince). If I close the viewer first and then close texstudio, no problem, no errors on the terminal.

This is the error:

QProcess: Destroyed while process is still running.

Old text: Every time when I close my texstudio after opened by my script below I got this error on the terminal:

QProcess: Destroyed while process is still running.

Here is the script fastex.sh


# Copyleft 2012 by Sigur

exec 3>&1
exec > "$file".tex
printf '\\documentclass[11pt,a4paper]{amsart}\n' 
printf '\\usepackage{amsfonts,amsthm,amsmath,amssymb}\n' 
printf '\\usepackage[latin1]{inputenc}\n' 
printf '\\usepackage[T1]{fontenc}\n' 
printf '\usepackage{tikz}\n'
printf '\usepackage[brazil]{babel}\n'
printf '\n' 
printf '\\begin{document}\n' 
printf '\n'
printf '\\end{document}' 

linha=$(wc -l < "$file".tex)
texstudio --line $linha  "$file".tex
find . -name  "fastex-temp.*" | grep -vP '.tex$|.pdf$' | while read -r i; do rm $i; done

I guess that the problem is with the find command to delete auxiliary files. So, is find executed only after I close texstudio?

Thanks for a while. Best wishes.

Edit enter image description here

share|improve this question
up vote 2 down vote accepted

I tried your script, with latest (2.4) version there was no problem,

If you forget to terminate the QProcess before closing main window of your program, you usually get this warning, I think the author has fixed that problem:

QProcess: Destroyed while process is still running.

texstudio doesn't release the pesudo tty when it's started, so deleting of files only start after texstudio quits.

And to remove files, it could be saved to one line:

find . -name "fastex-temp.*[^(tex|pdf)]" -exec rm {} \;


To test if the above command works fine, copy and run the following script:

DIR=$(mktemp -d) 
cd ${DIR}
touch fastex-temp.{aa,tex,pdf,bb}
find . -name "fastex-temp.*[^(tex|pdf)]" -exec rm {} \;

Now execute the command above and you would see only *.tex and *.pdf is left here.

enter image description here

share|improve this answer
Sorry, I didn't understand. For you, no error. OK. But your suggestion is to update my texstudio? Second: your command find will delete and keep only the pdf and tex files? I wish this. Thanks. – Sigur Sep 7 '12 at 0:30
@Sigur yes; and i provide a test case in my updated answer – warl0ck Sep 7 '12 at 0:39
I tried with 4 files .{aux,.log,.tex,.pdf} but only .log was deleted. Strange. Well, do you think that the problem with my version of texstudio could be fixed if I change my last line, maybe removing the auxiliaries files by other way? How did you install this new version of texstudio? – Sigur Sep 7 '12 at 1:17
@Sigur what shell, and distro do you use ? I provided a screenshot, that command works for me – warl0ck Sep 7 '12 at 1:20
Hum, I don't know. I think that it is bash. I am using Lubuntu 11.10. I will edit my post and put a print screen. – Sigur Sep 7 '12 at 1:28

Your Answer


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.