kill - send a signal to a process
function kill (pid, signum)
integer pid, signum
Pid must be the process id of one of the user's processes. Signum must be a valid signal number (see sigvec(2)). The returned value will
be 0 if successful; an error code otherwise.
SEE ALSO kill(2), sigvec(2), signal(3F), fork(3F), perror(3F)4.2 Berkeley Distribution May 15, 1985 KILL(3F)
Check Out this Related Man Page
KILL(2) System Calls Manual KILL(2)NAME
kill - send signal to a process
int pid, sig;
Kill sends the signal sig to a process, specified by the process number pid. Sig may be one of the signals specified in sigvec(2), or it
may be 0, in which case error checking is performed but no signal is actually sent. This 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 super-user. A single
exception is the signal SIGCONT, which may always be sent to any descendant of the current process.
If the process number is 0, the signal is sent to all processes in the sender's process group; this is a variant of killpg(2).
If the process number is -1 and the user is the super-user, the signal is broadcast universally except to system processes and the process
sending the signal. If the process number is -1 and the user is not the super-user, the signal is broadcast universally to all processes
with the same uid as the user except the process sending the signal. No error is returned if any process could be signaled.
For compatibility with System V, 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. This is a variant of killpg(2).
Processes may send signals to themselves.
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
Kill will fail and no signal will be sent if any of the following occur:
[EINVAL] Sig is not a valid signal number.
[ESRCH] No process can be found corresponding to that specified by pid.
[ESRCH] The process id was given as 0 but the sending process does not have a process group.
[EPERM] The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving
process. When signaling a process group, this error was returned if any members of the group could not be signaled.
SEE ALSO getpid(2), getpgrp(2), killpg(2), sigvec(2)4th Berkeley Distribution May 14, 1986 KILL(2)
ok, I configured inetd.conf so that the tftp string
is not commented out, but I cannot get the process to start.
I'm running Solaris 5.8 and need some help.
Cabletron said that it's process is 3485, i tried to kill it, it's the wrong process. I started inetd again and still can't kill it.
i... (15 Replies)
i have a script that read a file which contains process_id and time that he's
in and it lookes like this
i need to read every line in the file and get the time and if the process is greater then 0:30 to kill the process id
the script looks like... (17 Replies)
Dear Unix Gurus,
Here is my query.
If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel.
Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more.
... (15 Replies)
I am trying to kill a backend process i know i can type a simple command
kill -9 pid and my process will be killed.
But the task is that there are two commands in the script which run the backend process and when that script is runned then we cannot find the PID of the two commands ... (13 Replies)
I have a process running.......i have to catch/trap the signal when the process is being interupted/killed (kill -9 pid) option......
how can i achieve the same thru my process........
let my process is a.sh and it supposed to take 13 mins to complete, but due to some problem ,... (15 Replies)
i have one problem.
i run one script in backgroun.
and i want to kill that script with only script name.....
so what's the solution..
for your info
my script name is "testscript" n it contains "sleep 100"
thanks.... (16 Replies)
Can anyone explain?
I start my unix session on AIX, run tcsh move to a particular directory, let say: cd /test/bin and next i run a command like:
grep "test string" /test/bin/*
to look for the string in any files in the directory.
I am getting a response of Killed.
Why is that... (16 Replies)
I read a set of processes with:
ps -eaf|grep oracleTRLV
The result is:
oracle 23253 1 0 15:14:11 ? 0:00 oracleTRLV (LOCAL=NO)
oracle 23301 1 0 15:15:07 ? 0:00 oracleTRLV (LOCAL=NO)
oracle 22914 1 0 15:11:19 ? 0:00 oracleTRLV (LOCAL=NO)
How to I kill the "oracleTRLV" ones? Is there... (17 Replies)
My problem is the following, I have a little shell script that has a couple of functions... in one function I start an app like this...
runmqtrm -m $ourManager -q $ourMQSYS.EVTINITQ 1>/dev/null 2>&1 &
In another function I kill that app using
kill -s SIGKILL $triggerMonitorPID... (15 Replies)
I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this?
Thanks in advance!
- Ryan (19 Replies)
There is backup client software on Solaris-10. I wanted to restart that application, but one of PID is not getting killed even with -9. Can I try some more things before restarting server.
root@pdvtil03:/# ps -ealf | grep -i 6177
0 S root 28101 10844 0 50 20 ? 220 ?... (14 Replies)
When shutdown an oracle server i see this error message
umount: error unmounting /dev/oracle: Device busy
lsof and fuser report nothing
ps aux|grep oracle
oracle 5964026 0,0 0,0 448 448 - A apr 21 0:00 aioserver
oracle ... (16 Replies)
I'm trying to run a script remotely on a server in a particular directory named after hostname which already exists, my login session gets killed as soon as I run the below command. Not sure what is wrong, is there a better way to do it ?
Note: I can also use nohup command to run... (14 Replies)