02-06-2013
If the ps in Don's pipeline obtains the process listing after the grep processes in the pipeline have been created, the pid of grep 'CAL255.4ge, if run by wilruiz0, will be part of the result. The grep -v grep filters it out.
However, since by the time that kill is invoked the grep processes are gone, it's highly unlikely that the pid will be valid (highly unlikely, but it's not impossible that another process could have been created with that same pid).
Regards,
Alister
This User Gave Thanks to alister For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages.
How can i terminate this daemon ? ? ?
Regards,
Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
2. Programming
Hi all
i have simple c program , when i wish to kill the app
im using kill(0,-9) , but it seams this command don't do any thing and the program.
just ignore it .
what im doing wrong here ?
im using HP-UX ia64
Thanks (9 Replies)
Discussion started by: umen
9 Replies
3. Shell Programming and Scripting
Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies
4. Linux
I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies
5. Shell Programming and Scripting
Soz im a bit newbie...
I want to do:
ps -A | grep firefox | kill $1
it should kill the pid associated, but it doesnt work.
$1 is the pid (if i do a awk {'print $1'} i get it ) , but kill doesnt take it as such...
How can i do it? (3 Replies)
Discussion started by: ierpe
3 Replies
6. Shell Programming and Scripting
Hi
I want to write a shell script which can find the process id's of all the process and kill them eg:
ps ax | grep rv_
3015 ? S 0:00 /home/vivek/Desktop/rv_server
3020 ? S 0:00 /home/vivek/Desktop/rv_gps
3022 ? S 0:00 /home/vivek/Desktop/rv_show
... (7 Replies)
Discussion started by: vivek_naragund
7 Replies
7. Shell Programming and Scripting
Hi
I have the process to kill regulary, but the PSID is dymatic change and not sure how to kill the specific process ID
Check the tradekast_rvd is running , if such process, kill the els process id
ps -e f |grep tradekast_rvd
ps -ef |grep els
then I kill els process id
... (2 Replies)
Discussion started by: linux_user
2 Replies
8. Shell Programming and Scripting
Hi,
I need something unusual, I guess. I need to start a process, and if that process displays a specific error message, I need to kill that process and restart it.
Something like:
startprocess | grep -i "This is the specific error message" && kill $pidof(startprocess)
Explanation, I need... (4 Replies)
Discussion started by: burek
4 Replies
9. Solaris
Hello everyone,
I have a process that I want to kill. I have tried kill-9 PID but it doesn't work. I have tried preap PID but it doesn't work too.
The parent of my process is the process whose PID is 1, so I can't kill it.
My OS is a Solaris 9.
Can anyone help me understand what's going... (3 Replies)
Discussion started by: adilyos
3 Replies
10. Shell Programming and Scripting
Hi,
Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running?
eg.
java java.jar task_run.txt
I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one.
I plan to terminate the java... (5 Replies)
Discussion started by: perl_beginner
5 Replies
KILL(1) User Commands KILL(1)
NAME
kill - send a signal to a process
SYNOPSIS
kill [options] <pid> [...]
DESCRIPTION
The default signal for kill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP,
CONT, and 0. Alternate signals may be specified in three ways: -9, -SIGKILL or -KILL. Negative PID values may be used to choose whole
process groups; see the PGID column in ps command output. A PID of -1 is special; it indicates all processes except the kill process
itself and init.
OPTIONS
<pid> [...]
Send signal to every <pid> listed.
-<signal>
-s <signal>
--signal <signal>
Specify the signal to be sent. The signal can be specified by using name or number. The behavior of signals is explained in sig-
nal(7) manual page.
-l, --list [signal]
List signal names. This option has optional argument, which will convert signal number to signal name, or other way round.
-L, --table
List signal names in a nice table.
NOTES Your shell (command line interpreter) may have a built-in kill command. You may need to run the command described here as /bin/kill
to solve the conflict.
EXAMPLES
kill -9 -1
Kill all processes you can kill.
kill -l 11
Translate number 11 into a signal name.
kill -L
List the available signal choices in a nice table.
kill 123 543 2341 3453
Send the default signal, SIGTERM, to all those processes.
SEE ALSO
kill(2), killall(1), nice(1), pkill(1), renice(1), signal(7), skill(1)
STANDARDS
This command meets appropriate standards. The -L flag is Linux-specific.
AUTHOR
Albert Cahalan <albert@users.sf.net> wrote kill in 1999 to replace a bsdutils one that was not standards compliant. The util-linux one
might also work correctly.
REPORTING BUGS
Please send bug reports to <procps@freelists.org>
procps-ng October 2011 KILL(1)