Results 1 to 3 of 3
I have a FIFO file I'm reading in a background loop:
Code:
while (true) ; do cat </tmp/ui-output ; done &
I close the terminal, open another one, run this ...
- 01-29-2009 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 27
How to kill background jobs? (kill %1 doesn't work)
I have a FIFO file I'm reading in a background loop:
I close the terminal, open another one, run this line again. After a while a have several 'cat /tmp/ui-output' processes running. Now I want to clean up the mess. When I run jobs in a new terminal it shows nothing. When I'm trying to kill by PID the processes are getting re-spawned:Code:while (true) ; do cat </tmp/ui-output ; done &
How do I catch them?Code:$ ps -o pid= -C 'cat /tmp/ui-output' 29773 29774 29775 29776 $ ps -o pid= -C 'cat /tmp/ui-output' | xargs kill $ ps -o pid= -C 'cat /tmp/ui-output' 29783 29785 29787 29788
Thanks.
- 01-29-2009 #2Just Joined!
- Join Date
- Nov 2008
- Location
- PUNE
- Posts
- 72
Hi
Try this
It will give you list of the list of programs running on your system with pid and command (program name)Code:top
the select the program you want to kill note down its pid
then pass this command
hope this will helpCode:kill -9 pid
- 01-29-2009 #3Just Joined!
- Join Date
- Oct 2006
- Posts
- 27
Thanks. I forgot kill sends TERM signal by default while I needed KILL.


Reply With Quote