Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Using Killall On Processes Started By Nohup
catbutt
post Nov 13 2002, 03:33 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 13-November 02
Member No.: 147



I often start background processes with the "nohup" command followed by an "&". If I do a "ps -aux", I see the process listed as being "bash" followed by the process name.

The problem is that the processes often cannot be killed by "killall", presumably because it thinks the process name is "bash", and I don't want to kill all processes named bash. I have to use "kill" and the process id, which is hard to script. Is there something I am doing wrong? I know there must be an easy and reliable way to write a script that kills a process running in the background.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 2)
chrisw
post Nov 13 2002, 03:45 PM
Post #2


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



that is how you have to kill a process that is backgrounded....you have to use kill with the process id


--------------------

Chris W.
Go to the top of the page
 
+Quote Post
catbutt
post Nov 13 2002, 06:24 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 13-November 02
Member No.: 147



Thanks for the quick reply.

So.....how do I get the process id if I am doing it with a script? Do I have to use some sort of awk script on the output of ps? I don't know awk, so I guess I could write a custom program in c to parse out stuff out of ps, but I'm sure there is a more standard way to do it. Anyone have a script or other technique to do this?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2017 - 04:45 PM