in reply to fork kills Inline::Java

If I remember correctly Inline::Java communicates with a separately running JVM via a socket connection. If that's true then it may be that when your child process dies it's closing the socket connection (which it shares with the parent) and that's borking your connection to the JVM.

One way to solve the problem would be to replace your fork() with a system() call that starts a new Perl process to perform your leaky code:

   system("$^X -MSerious::Leaker -e 'Serious::Leaker->leak_on()'");

If that's impractical, you might look at the JNI and shared JVM options for Inline::Java (http://search.cpan.org/~patl/Inline-Java-0.52/Java.pod#JNI_vs_CLIENT/SERVER_MODES). It seems like either one might solve this problem. The shared JVM option seems particularly attractive since it also may improve performance.

-sam