LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2015, 09:59 PM   #1
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Rep: Reputation: 30
How to kill a process and stop it from reappearing ?


When I kill some processes, (not as root) They pop back up at the bottom of the list with a new process ID.
What gives???? How does one kill a process and not have it reappear a second later?
 
Old 01-02-2015, 10:30 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest, has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,084
Blog Entries: 2

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
What's the process? Could run
Code:
sudo top
and kill the PID as root to see what happens or uninstall what causes the process if it's not crucial?

http://askubuntu.com/questions/59811...he-process-why : http://youtu.be/Fow7iUaKrq4 (Kill Dash Nine! )

Last edited by jamison20000e; 01-02-2015 at 10:39 PM.
 
Old 01-02-2015, 10:52 PM   #3
quitus
LQ Newbie
 
Registered: Jan 2015
Posts: 8

Rep: Reputation: Disabled
you may run ps -lA to see what its parent is. If possible, kill the parent
 
1 members found this post helpful.
Old 01-02-2015, 11:17 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,875
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Probably the most important question: what process, exactly, do you have in mind? All processes are NOT created, or forked, equal!
 
Old 01-02-2015, 11:26 PM   #5
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Processes like cups and bluetooth respawn right after killing them. I have something called gphoto2 that I keep killing but it does not come back.
I dont use a printer and I have no use for bluetooth.
 
Old 01-02-2015, 11:28 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,599

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
It really depends on the desktop... and the executable.


In the case of the desktop, there are some processes that developers have decided should always be present (whether you want them or not). These get respawned when they die. There should be a configuration that defines this (session lists in one case, you can kill the process, but it pops up again...if you tell the session manager it should be killed, then it should not respawn it).

In the case of an executable, what is happening is that you are killing the wrong process .

Processes are forked - and it is possible to have a process that forks a child (as a service task) and then it waits for the process to exit. If the exit appears inappropriate, it can fork it again, thus it shows up.

The problem is that there is a race condition between what you choose to kill, and the next time the process shows up. In the time gap, a new process can be started before you get to kill it.
 
Old 01-02-2015, 11:33 PM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest, has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,084
Blog Entries: 2

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
You can turn off those services.

E.g: http://www.linuxquestions.org/questi...ckware-777436/
http://askubuntu.com/questions/19320...sable-services

Last edited by jamison20000e; 01-02-2015 at 11:36 PM.
 
Old 01-02-2015, 11:35 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,875
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by M$ISBS View Post
Processes like cups and bluetooth respawn right after killing them. I have something called gphoto2 that I keep killing but it does not come back.
I dont use a printer and I have no use for bluetooth.
Why not properly turn off the cups and bluetooth services instead of killing them?

You did not say the distro, but I am pretty sure cups would be started at boot and the system service manager would provide the ability to disable it or stop it if it is running (and respawn it if it dies unexpectedly).

Same for bluetooth I think...

Gphoto, I don't know but would guess the desktop environment would manage that one, look in the configs.

If you will tell us what distro and version, and desktop I am sure someone can point you in the right direction.

Last edited by astrogeek; 01-02-2015 at 11:36 PM. Reason: tpos... typs... typos...
 
1 members found this post helpful.
Old 01-03-2015, 11:41 AM   #9
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
I did turn them off, in the list with the boxes you uncheck, but they still show up.

Ubuntu 14, Cinnamon desktop.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to kill a process in Linux - kill, killall, pkill, xkill LXer Syndicated Linux News 0 04-02-2013 01:01 PM
Kill a zombie process - which process is the parent that I should kill? Mountain Linux - General 3 12-31-2011 03:44 PM
how to kill or clean a Uninterruptible slept session leader process from process tabl golden_boy615 Linux - General 1 12-14-2010 11:47 AM
Kill child process problem. No matter what i try cant stop pid becoming a zombie?? ajb181 Linux - Software 1 11-15-2009 06:36 PM
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 10:42 AM


All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration