10-30-2009
kill 1 ==> The process with pid 1 will be signaled.
kill 0 ==> All processes in the current process group are signaled.
kill -1 ==> All processes with pid larger than 1 will be signaled.
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. Shell Programming and Scripting
Hi All,
In my project i have two process runs in the back end.
Once i start my project, and execute the command ps, i get below output:
PID TTY TIME CMD
9086 pts/1 0:00 ksh
9241 pts/1 0:02 java
9240 pts/1 0:00 shell_script_bg
java with 9241 PID is the main... (4 Replies)
Discussion started by: rkrgarlapati
4 Replies
3. UNIX for Dummies Questions & Answers
Hello everyone
I am using HP Ux and had run a find command. Now I am trying to kill it with kill or kill -9 but it is not getting killed and still running. Any clues ?
Thanks
Sidhu (5 Replies)
Discussion started by: Amardeep
5 Replies
4. 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
5. UNIX for Advanced & Expert Users
Hi,
I have a process with say pid x. What is the difference b/n
kill x and kill -9 x in unix
Thanks
Ammu (2 Replies)
Discussion started by: ammu
2 Replies
6. Shell Programming and Scripting
Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies
7. 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
8. UNIX for Dummies Questions & Answers
i want know the the diffrence between kill and kill -9 (3 Replies)
Discussion started by: rupesh.bombale
3 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
Good afternoon
I need to KILL a process in a single command sentence, for example:
kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'`
That sentence Kills the process ID corresponding to the program CAL255.4ge.
However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies
kill(2) System Calls Manual kill(2)
Name
kill - send signal to a process
Syntax
#include <sys/types.h>
#include <signal.h>
kill(pid, sig)
pid_t pid;
int sig;
Description
The system call sends the signal sig to a process specified by the process number pid. The sig can be a signal specified in a call or it
can be 0. If the sig is 0, error checking is performed, but a signal is not sent. This call can be used to check the validity of pid.
The sending and receiving processes must have the same effective user ID, otherwise this call is restricted to the superuser with the
exception of the signal SIGCONT. The signal SIGCONT can always be sent to a child or grandchild of the current process.
If the process number is 0, the signal is sent to all other processes in the sender's process group.
If the process number is negative but not -1, the signal is sent to all processes whose process-group-id is equal to the absolute value of
the process number.
The above two options are variants of
If the process number is -1, and the user is the superuser, the signal is broadcast for all processes except to system processes and the
process sending the signal.
Processes may send signals to themselves.
Environment
System Five
POSIX
When your program is compiled in the System V or POSIX environment, a signal is sent if either the real or effective uid of the sending
process matches the real or saved-set-uid (as described in ) of the receiving process. In addition, any process can use a pid of -1, and
the signal is sent to all processes subject to these permission checks.
In POSIX mode, the pid argument is of type pid_t.
Return Values
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned, and is set to indicate the error.
Diagnostics
The system call fails under the following conditions:
[EINVAL] The sig is not a valid signal number.
[EPERM] The sending process is not the superuser, and its effective user ID does not match the effective user ID of the receiving
process.
[ESRCH] No process can be found corresponding to that specified by pid.
See Also
execve(2), getpgrp(2), getpid(2), killpg(2), sigvec(2), pause(3)
kill(2)