# killing a process

**URL:** <https://community.unix.com/t/killing-a-process/171701>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [June 1, 2007, 10:35am UTC](https://community.unix.com/t/killing-a-process/171701 "2007-06-01T10:35:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbhayana](https://community.unix.com/letter_avatar/bbhayana/32/5_5575768a8748004e209b776fc1b2916d.png) [@bbhayana](https://community.unix.com/u/bbhayana)\
**Post date:** [June 1, 2007, 10:35am UTC](https://community.unix.com/t/killing-a-process/171701/1 "2007-06-01T10:35:16Z")

</div>

I can kill running processes on my linux red hat system using ctrl-c but cannot do it from command line of another terminal using kill -2 pid. Although I can kill them from command line using kill -9 pid and other signals. I would like to do it using the kill -2 pid.  
Thanks for your suggestions

---

<div class="post-metadata">

**Author:** ![jim\_mcnamara](https://community.unix.com/letter_avatar/jim_mcnamara/32/5_5575768a8748004e209b776fc1b2916d.png) [@jim\_mcnamara](https://community.unix.com/u/jim_mcnamara)\
**Post date:** [June 1, 2007, 3:22pm UTC](https://community.unix.com/t/killing-a-process/171701/2 "2007-06-01T15:22:20Z")

</div>

Does

```nohighlight
kill -SIGINT <pid>

```

work? I am assuming that SIGINT may not be == 2 on your box.

my bad kill -int \<pid\> is the correct command, which you say does not work

---

<div class="post-metadata">

**Author:** ![bbhayana](https://community.unix.com/letter_avatar/bbhayana/32/5_5575768a8748004e209b776fc1b2916d.png) [@bbhayana](https://community.unix.com/u/bbhayana)\
**Post date:** [June 1, 2007, 3:36pm UTC](https://community.unix.com/t/killing-a-process/171701/3 "2007-06-01T15:36:45Z")

</div>

kill -SIGINT pid does not work, I get error saying "SIGINT unknown signal". then I typed kill -l to see list of options. Among several options were INT and TERM.  
kill -TERM PID killed the process and so did kill -9 pid. But kill -2 pid and kill -INT pid fail. kill -HUP pid also works.  
It maybe that all the kill options are not active on my system? Thanks for your response.

---

<div class="post-metadata">

**Author:** ![porter](https://community.unix.com/letter_avatar/porter/32/5_5575768a8748004e209b776fc1b2916d.png) [@porter](https://community.unix.com/u/porter)\
**Post date:** [June 1, 2007, 6:59pm UTC](https://community.unix.com/t/killing-a-process/171701/4 "2007-06-01T18:59:06Z")

</div>

With the cmd line kill tool the symbols are INT, TERM, HUp, QUIT etc, as in the SIGxxx without the SIGxxx.

Any process can choose to ignore signals if it so wants (apart from 9).

You still need permission to send a signal, trying with signal zero will tell you if you have those permissions.

---

<div class="post-metadata">

**Author:** ![matrixmadhan](https://community.unix.com/letter_avatar/matrixmadhan/32/5_5575768a8748004e209b776fc1b2916d.png) [@matrixmadhan](https://community.unix.com/u/matrixmadhan)\
**Post date:** [June 2, 2007, 1:22am UTC](https://community.unix.com/t/killing-a-process/171701/5 "2007-06-02T01:22:29Z")

</div>

> [@](#):
>
> You still need permission to send a signal, trying with signal zero will tell you if you have those permissions.

This is not true.

Sending signal 0 to process will indicate only ' whether a process is alive or not and not about the permissions the users has with respect to the process '.

When a normal user sends signal to a process which is running as process owned by ' root ' ALIVE status ( indicating that the process is running ) would be returned.

---

<div class="post-metadata">

**Author:** ![porter](https://community.unix.com/letter_avatar/porter/32/5_5575768a8748004e209b776fc1b2916d.png) [@porter](https://community.unix.com/u/porter)\
**Post date:** [June 2, 2007, 1:42am UTC](https://community.unix.com/t/killing-a-process/171701/6 "2007-06-02T01:42:04Z")

</div>

> [@matrixmadhan](#):
>
> Sending signal 0 to process will indicate only ' whether a process is alive or not and not about the permissions the users has with respect to the process '.

Solaris 10 does the following:

```plaintext
bash-3.00$ kill -0 515
bash: kill: (515) - Not owner

```

Looks like a permissions thing to me.

---

<div class="post-metadata">

**Author:** ![reborg](https://community.unix.com/user_avatar/community.unix.com/reborg/32/167_2.png) [@reborg](https://community.unix.com/u/reborg)\
**Post date:** [June 2, 2007, 7:58am UTC](https://community.unix.com/t/killing-a-process/171701/7 "2007-06-02T07:58:19Z")

</div>

In the case where either the process does not exists, or the user does not have the required permissions kill will exit \> 0 . There is nothing to require any more information than this in POSIX. In general however the reason will be output to stderr.
