Adam:
> Speaking as the guy who originally added kqueue support to Skim for
> watching files and reloading when they changed, it's not a matter of
> desire; it's technically impossible to fix.
Ahh. Why is that? Is it that it is impossible to know when the file
is completed?
> > If there were a technical way to know when the file is done and to
> > prevent Skim from ever crashing this way, that would be very useful.
>
> This can only be accomplished by modifying the program which generates
> the PDF, unfortunately.
The external program that is running Skim could certainly be modified.
What would it need to do to prevent Skim from crashing?
I can think of two approaches.
First there might be a way to signal to Skim that the file is ready.
Second, one could switch soft links, which is fast. I tried that and
Skim did not detect the switch. :-(
> Anyway, I only mention this here because it appears that the OP is
> writing a program to run unattended, and may not have the luxury of
> relaunching Skim when it crashes. His choice.
Right.
Instead of soft links, I tried hard links ('ln' instead of 'ln -s')
and it worked!
********************************************************************************
#!/bin/tcsh -f
#(ie run the tshell on this but don't read the .cshrc or .tcshrc)
echo version = 1.00 of hardlk 2015 Jan 06
# 2015 Jan 06, 1.00: origin
echo switch hard links
# going through soft links worked:
set sourcefile1 = a.pdf
set sourcefile2 = b.pdf
# now do it directly
set sourcefile1 = =lattice_20.pdf
set sourcefile2 = =lattice_21.pdf
rm -f link.pdf; ln $sourcefile1 link.pdf
skim link.pdf
skim link.pdf
while (1)
sleep 3
clear
rm -f link.pdf; ln $sourcefile2 link.pdf
ls -l *.pdf
sleep 3
clear
rm -f link.pdf; ln $sourcefile1 link.pdf
ls -l *.pdf
end
********************************************************************************
Adam, would that be fast enough or guarantee that it would not crash?
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
Gene Regulation and Chromosome Biology Laboratory
Molecular Information Theory Group
Frederick, Maryland 21702-1201
http://schneider.ncifcrf.gov (current link)
http://alum.mit.edu/www/toms (permanent link)
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users