I have written java FUSE bindings via JNA with the (now realized) goal of being
able to write filesystems in scala. I
never would have undertaken the effort without JNA, so thanks a lot. It'll all
be open source once it's a bit more
polished, should anyone else be interested. But I'm not quite there yet,
because my filesystems only work when run in
foreground mode. If I run them in the usual fuse way the JVM crashes
immediately. I tracked this down to its use of
libc's daemon call:
// the world's shortest core dumping scala program
import Libc.INSTANCE._
object Oops extends Application { daemon(0, 0); }
I am hopeful I'm neglecting to do something that will be obvious to others. It
seems like perhaps the JVM itself is
trying to exit since it sees no more java-side activity, and libfuse flails at
that point? But I have tried things like
spinning off the fuse call in a separate (non-daemon) thread without any
improvement.
I'm working on OS X if it makes any difference, and on the off chance it reveals
anything here's a snippet of the crash
report. Thanks much for any pointers (ha ha, pointers, it never gets old.)
Thread 0 Crashed:
0 libclient.dylib 0x0067da04 JVM_RaiseSignal + 441284
1 libclient.dylib 0x00472f05 0x3b9000 + 761605
2 libclient.dylib 0x00472a46 0x3b9000 + 760390
3 libclient.dylib 0x006b6bb3 JVM_RaiseSignal + 675187
4 libclient.dylib 0x006b7357 JVM_RaiseSignal + 677143
5 libclient.dylib 0x005af2a0 JNI_GetCreatedJavaVMs_Impl + 1760
6 java 0x00004137 0x1000 + 12599