signal for kill -9

M

Miguel

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
 
R

ramashishb

Miguel said:
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.
 
A

Alex Buell

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.
 
T

Tomás

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top