Operating System - Linux
1752600 Members
4718 Online
108788 Solutions
New Discussion

Re: Implementation of UNIXProcess.destroy in the JNI

 
Peter Suggitt
Occasional Contributor

Implementation of UNIXProcess.destroy in the JNI

Hi

When a process destroy is called on UNIXProcess implementation in the v1.4.2_04 jre for linux what heppens underneath the JRE? All I can see is that for a given PID, the JNI interfaces a method called
private static native void destroyProcess(int pid);

What is the logic for this method .. how does it make sure that the process dies? What signals is it sending to the OS? Any info would be helpful .. or a copy of the implementation if anyone has it would be cool too.

Thanks in advance
1 REPLY 1
Peter Suggitt
Occasional Contributor

Re: Implementation of UNIXProcess.destroy in the JNI

The only thing that I have been able to ascertain is that the signal that is sent to the underlying process is a SIGTERM (15).

What if the process refuses to die? Does it issue other signals .. eg SIGKILL?