I have used a method waitFor of Process class, to execute some UNIX command. The command is executing successfully but it is returning 2
, that according to convention means abnormal termination.
I googled and found that it depends on "source code of the program that is outputting this exit code". So I tried to find the source code for waitFor method, I came to know that it is a native method and defined in ProcessImpl
class.
public native int waitFor();
So I searched for native implementation of this method from here. But I did not found the file that provide me the native implementation of waitFor
method.
My question is how to find the file in which native implementation of this method is written?