Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > signal for kill -9

Reply
Thread Tools

signal for kill -9

 
 
Miguel
Guest
Posts: n/a
 
      05-26-2006
What signal have I to take into account in order to capture the 'kill -9
[PID]' call from command shell?

the code is something like this

void manager(int i){
printf("%d\n",i);
system("chmod 644 prueba.mig");
exit(0);
}

int main(){
int fd;
signal(SIGINT,manager);
signal(SIGKILL,manager);
fd = create("prueba.mig");
while(1==1){}
}

thank you in advance.

Miguel

 
Reply With Quote
 
 
 
 
Jonathan Mcdougall
Guest
Posts: n/a
 
      05-26-2006
Miguel wrote:
> What signal have I to take into account in order to capture the 'kill -9
> [PID]' call from command shell?


This newsgroup deals with standard C++ only. Please refer to
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 for
newsgroup suggestions.


Jonathan

 
Reply With Quote
 
 
 
 
Roland Pibinger
Guest
Posts: n/a
 
      05-26-2006
On 26 May 2006 01:48:27 -0700, "Jonathan Mcdougall"
<> wrote:
>Miguel wrote:
>> What signal have I to take into account in order to capture the 'kill -9
>> [PID]' call from command shell?

>
>This newsgroup deals with standard C++ only. Please refer to
>http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 for
>newsgroup suggestions.


Some signals (e.g. SIGINT) are defined for Standard C and C++.

Best wishes,
Roland Pibinger
 
Reply With Quote
 
ramashishb@gmail.com
Guest
Posts: n/a
 
      05-26-2006
Miguel wrote:
> What signal have I to take into account in order to capture the 'kill -9
> [PID]' call from command shell?


9 is SIGKILL. But you can't capture it. Also 19 or SIGSTOP can't be
captured.

 
Reply With Quote
 
Alex Buell
Guest
Posts: n/a
 
      05-26-2006
On Fri, 26 May 2006 08:37:38 GMT, I waved a wand and this message
magically appeared:

> What signal have I to take into account in order to capture the 'kill
> -9 [PID]' call from command shell?


You cannot do that. If it was possible to capture that, you'd end up
with processes that cannot be killed off. You'd have to power-cycle.
--
http://www.munted.org.uk

Take a nap, it saves lives.
 
Reply With Quote
 
Tomás
Guest
Posts: n/a
 
      05-26-2006
Miguel posted:

> What signal have I to take into account in order to capture the 'kill -9
> [PID]' call from command shell?



God::Communicate::AskPlatformSpecificQuestion();


-Tomás
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trap jvm kill signal sai krishna Java 3 06-07-2007 04:40 AM
Handling KILL signal in a perl script Swarup Baran Perl Misc 12 07-26-2006 06:38 AM
KILL BABY KILL widescreen drsd2kill DVD Video 3 11-29-2004 09:36 PM
Bava's KILL BABY KILL widescreen drsd2kill DVD Video 0 11-27-2004 12:04 AM
How to send a kill signal from Eclipse? Ahmed Moustafa Java 4 09-03-2003 05:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57