This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
will print a table of processes with commandname 'cupsd'. There is a number, called 'pid' - the process-id. with this number - assuming 1234, you may kill it: , which is a friendly way to tell the program to stop. It may try to finish in a nice way, closing open files, database connections, ... After two or three seconds, look whether it was killed successfully:
If it is still running, kill it with
Read 'man kill' and 'man ps' to find out more on this commands.
You will need some time to understand everything, but understanding a bit more from time to time in small steps will lead you to deeper knowledge.
Last but not least - we don't like crossposting. But we like specific subjects, like 'stop a background process' - not 'learner'. We are all learners.
[ October 22, 2004: Message edited by: Stefan Wagner ] [ October 22, 2004: Message edited by: Stefan Wagner ]
However, cupsd is a daemon, which is equivalent to a Windows Service, so you probably don't want to do a kill, you probably want it to shut down clean (unless it's locked up or something). For that, do the following:
Or, for Red Hat/Fedora this also works:
/sbin/service cupsd stop
Customer surveys are for companies who didn't pay proper attention to begin with.
yes, that can work. The full sequence is 1$ jobs 2$ fg <number> 3$ ^C
1 gives a list of jobs running as child processes for this terminal. 2 brings one of these to the foreground 3 sends a terminate signal to this program. Whether the program recognises that signal depends on how it's programmed.
It doesn't work for jobs that were started from other terminals (for example on system startup) though.
Joined: Oct 22, 2004
But i have started jobs from other terminals in background. SO how to proceed to stop it.
Joined: Oct 12, 2000
use ps -a (or ps -A if they were started by another user), grep the output to get the PID of the process you want to kill, and use kill to kill it.
For example $ ps -a | grep 'rlogin' | more will retrieve all PIDs for rlogin processes. $kill -15 124535 will send a kill signal to process 124535, kill -9 124535 will terminate process 124535 with extreme prejudice (not even giving it time to clean up after itself).