implement Runtime.addShutdownHook and Thread.setDaemon; avoid segfaults due to an application calling e.g. CallStaticBooleanMethod when it really meant CallStaticVoidMethod

This commit is contained in:
Joel Dice
2009-08-19 14:27:03 -06:00
parent df3baeb83b
commit c4b5ecec90
6 changed files with 189 additions and 81 deletions

View File

@ -59,6 +59,8 @@ public class Runtime {
return new MyProcess(process[0], (int) process[1], (int) process[2], (int) process[3]);
}
public native void addShutdownHook(Thread t);
private static native void exec(String[] command, long[] process);
private static native int exitValue(long pid);