The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
killing the process arthi UNIX for Dummies Questions & Answers 3 06-03-2008 09:57 AM
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 07:10 PM
Reg process of killing shanshine SUN Solaris 6 12-05-2007 02:50 PM
Killing specific process benefactr Shell Programming and Scripting 6 10-25-2007 01:23 PM
killing a process pid jo calamine UNIX for Advanced & Expert Users 16 12-04-2006 07:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-01-2007
bbhayana bbhayana is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 3
killing a process

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
  #2 (permalink)  
Old 06-01-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,808
Does

Code:
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

Last edited by jim mcnamara; 06-02-2007 at 12:57 PM..
  #3 (permalink)  
Old 06-01-2007
bbhayana bbhayana is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 3
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.
  #4 (permalink)  
Old 06-01-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
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.
  #5 (permalink)  
Old 06-02-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,960
Quote:
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.
  #6 (permalink)  
Old 06-02-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by 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:


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

Looks like a permissions thing to me.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0