I have written a "mylib_printlatexeps.m": http://www.jpberlin.de/st.pofahl/html/science-and-software/octave/octave3.0-examples.html (up to now, if you do not provide a propper gv-command string as the third argument, it's only
working out of the box under MS-XP, with latex and ghostview properly installed). Under MS-Windows it is no problem to start only one gv-Window, the only thing you have to do, is to add the command-line switch "-e", but I don't know how to
do the same thing under unix. I tried the following: > PIDGV=system("gv ",1,"async") > strg=['kill -SIGHUP ', num2str(PIDGV)] > system(strg,1)
But the result is strange, I receive the following error message:
> sh: line 0: kill: SIGHUP: invalid signal specification
I also tried the octave-"unix" command, but the result is the same. Can someone tell me the trick? How can I ensure, that my octave function opens gv only
in one incident.
One ugly method could be to kill the last 'gv'-process, before starting a new, but there should be a more clever one:
> [STATUS,PIDGV]=system ('pidof -s gv'); > if (STATUS==0)
> strg=['kill -9 ', num2str(PIDGV)]; > system (strg); > endif