|
processes remain after I have logged out!
I am running Redhat 9, with GNOME.
I wrote a little script that runs in the background after I login. I placed it in my '.login' file, like this:
...
/genesis/get_mon_lx &
...
When I look at it with ps -ef, if will look like this:
image 5067 5013 0 08:33 pts/0 0:00:00 /bin/sh /genesis/get_mon_lx
This is the content of the program "get_mon_lx":
----------
while true
do
/genesis/snapshot_lx.py
sleep 1200
done
----------
The program is runs is a python program that runs for a few seconds, checks a couple processes, writes to a log file. It then waits for about 20 minutes, and runs again.
There are multiple users on this machine, and each login runs this program.
The problem is when a user logs out. This is what the process list looked like this morning:
image 4132 1 0 Nov 10 ? 0:00:00 /bin/sh /genesis/get_mon_lx
image 3144 1 0 Nov 10 ? 0:00:00 /bin/sh /genesis/get_mon_lx
image 5422 1 0 Nov 10 ? 0:00:00 /bin/sh /genesis/get_mon_lx
image 12332 1 0 Nov 10 ? 0:00:00 /bin/sh /genesis/get_mon_lx
image 2378 1 0 Nov 10 ? 0:00:00 /bin/sh /genesis/get_mon_lx
image 8733 4333 0 07:34 pts/0 0:00:00 /bin/sh /genesis/get_mon_lx
Everything that had been started the day before was still there! Why doesn't this process get killed on logout? What is going wrong? Any ideas? On other machines, I have had much cleaner logouts (HP-UX for example, always cleans up impeccably after a logout)
Help greatly appreciated. I can't have these left behind on every logout.
Thanks!
|