4 messages in net.java.dev.jna.usersRe: [jna-users] Attempt at DNotify
FromSent OnAttachments
Erik EarleJan 30, 2009 1:25 pm.log, .java
Timothy WallJan 31, 2009 5:50 pm 
Timothy WallJan 31, 2009 5:53 pm 
Daniel KaufmannFeb 2, 2009 6:00 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Attempt at DNotifyActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jan 31, 2009 5:53:11 pm
List:net.java.dev.jna.users

You should also not use the VM crash protection with multi-threaded code. It overwrites VM signal handlers for the duration of native calls.

On Jan 30, 2009, at 4:25 PM, Erik Earle wrote:

I tried to duplicate the c example for dnotify.c here: http://souptonuts.sourceforge.net/code/dnotify.c.html

The attached is what I came up with. It works... somewhat. - I get segmentation faults if I do anything other than touch or rm a file, (opening a file with vi or 'echo foo > foo.txt' causes the fault) - I don't get modified events. - In spite of setting the flag for the calling the 3 arg callback, it still only calls the single arg callback.

I'm running: - Ubuntu Gutsy, Linux xxxxx 2.6.24-23-generic #1 SMP Thu Nov 27 18:44:42 UTC 2008 i686 GNU/Linux - java version "1.6.0_07" - jna-3.0.7

I've tried to get a memory dump using the instructions here:
https://jna.dev.java.net/ #struct_debug (the "-Djna.dump_memory=true" prop) but I the output just show this: sigaction: DNotify$SigAction(allocated@0x81155f0 (144 bytes)) { DNotify$__sighandler_t sa_sighandler@0=com.sun.jna.examples.linux.DNotify$1@1cd8669 DNotify$__sigaction_t sa_sigaction@4=com.sun.jna.examples.linux.DNotify$2@337838 DNotify$__sigset_t sa_mask@8=DNotify$__sigset_t(allocated@0x8158810 (128 bytes)) { int __val[32]@0=[I@119cca4 } int sa_flags@88=4 DNotify$__sigrestorer_t sa_restorer@8c=com.sun.jna.examples.linux.DNotify$3@ca2dce } memory dump [00000000] [00000000] [00000000] .... (just keeps repeating the zeros)

sometimes I get a core dump, that's also attached.

Any thoughts?

< hs_err_pid28433 .log

< DNotify .java

To unsubscribe, e-mail: user@jna.dev.java.net For additional commands, e-mail: user@jna.dev.java.net