I use the llpp pdf viewer when editing my LaTeX files. To have it automatically refreshing the pdf file when I compile, I use a wrapper to launch it (cf. this).
The part handling the waiting and refreshing is this one :
inotifywait -m -e close_write $1 | while read; do
kill -HUP $pid_llpp
done &
My problem is the following : whenever an error occurs in the compilation of the tex file, no pdf output is procuded and llpp is closing. I tried something like that :
inotifywait -m -e close_write $1 | while read; do
if [ -a $1 ]
then
kill -HUP $pid_llpp
fi
done &
It works partially : when an error occurs during the compilation, llpp doesn't close but does not refresh anymore...
Could anyone help me to solve this problem ?