Advance apologies for what is probably a simple question. I have some basic questions about using ssh to run programs that I can't resolve via Google. I'm using Unix (via the program "Terminal" on Mac OS 10.6.7).
I am accessing a different machine using ssh. Once there, I'm running some code. This results in output files in a directory on that machine. I terminate a run by doing "control C." I get rid of the output files by doing:
find . -type f -name "*.vtk" -exec rm -f {} \;
The problem is that:
The person whose machine it is tells me there are multiple versions of my code running. I don't understand how I'm not stopping these by doing "control C." Can anyone explain?
Also (this might be related to the first problem), when I run the "find" command above to get rid of the output files, if I wait a few seconds/minutes, some output files have appeared again! Could this be related to the "ghost" versions of the code running, that I can't terminate?
If anyone could tell me how to make sure I have terminated ALL runs and how to get rid of ALL vtk (or other suffix) output files from a directory, I would really appreciate it. Also, any suggestions regarding online resources about all this ssh stuff would be very welcome. Thanks a lot.
Ctrl+Cnormally terminates the program running in the terminal, but programs are allowed to catch the signal. Also, if the program is composed of several processes, it's possible that not all processes would be killed. Did you write that program, or are you just a user of it? What is that program? What variant of unix is running on the remote machine? Exactly what ssh command do you use to run the program? – Gilles Apr 30 '11 at 11:18uname -sron the remote machine to see what unix variant it's running. Do you useforkor signal handlers in your program, or a library that might use them under the hood? – Gilles Apr 30 '11 at 11:30