Re: JNI calls from inside UNIX signal handler

Discussion in 'Java' started by Marc Rochkind, Jul 9, 2003.

  1. On 9 Jul 2003 09:51:07 GMT, Gordon Beaton <> wrote:

    > On Tue, 08 Jul 2003 15:48:53 -0600, Marc Rochkind wrote:
    >> Has anyone had success making JNI calls from inside a signal
    >> handler? I can think of lots of reasons why this won't work, but in
    >> fact I'm having pretty good results.

    >
    > Have you considered that the JNI functions might contain calls to
    > things that aren't async signal safe, and therefore shouldn't be
    > called from a signal handler? That could explain why FindClass()
    > sometimes fails.
    >
    > /gordon
    >


    Absolutely. That was always foremost on my mind. Just today, I've found
    some
    strangeness caused by calls to NewObject in a signal handler, and it's
    pretty easy
    to see why.

    (It's a long story, to be told later in a different form, but I'm trying to
    interface
    Java to POSIX/SUS with as close to 100% realism as possible. Hence, I need
    to create
    a siginfo_t object in a real-time signal handler. If it doesn't work,
    that's OK, too (can't get water out of a rock), but I first want to test
    the limits. I am probably going to
    eliminate signals from the package in the end.)

    --Marc
     
    Marc Rochkind, Jul 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph Millar
    Replies:
    5
    Views:
    1,794
    Marc Rochkind
    Jul 10, 2003
  2. Replies:
    12
    Views:
    1,702
    Dave Thompson
    Jan 10, 2005
  3. Michael Pronath
    Replies:
    1
    Views:
    1,243
    Diez B. Roggisch
    Jan 3, 2005
  4. Replies:
    18
    Views:
    661
    Dave Thompson
    Jan 10, 2005
  5. Replies:
    6
    Views:
    1,378
    James Kanze
    Jun 10, 2008
Loading...

Share This Page