8 messages in net.java.dev.jna.usersIs there a way to handle a union cons...
FromSent OnAttachments
Dennis PortelloMay 14, 2007 7:27 am 
Wayne MeissnerMay 14, 2007 5:59 pm 
Dennis PortelloMay 15, 2007 10:48 pm 
Wayne MeissnerMay 16, 2007 3:54 am 
Timothy WallMay 16, 2007 5:51 am 
Timothy WallAug 27, 2007 9:53 am 
Dennis PortelloAug 27, 2007 9:59 am 
Timothy WallAug 27, 2007 11:27 am 
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:Is there a way to handle a union construct?Actions...
From:Dennis Portello (denn@gmail.com)
Date:May 14, 2007 7:27:18 am
List:net.java.dev.jna.users

Hi,

I've been experimenting with JNA over the last few days to gain access to POSIX functions on Linux/Unix.

So far I've had success with calling setuid when running Apache Tomcat so I can start as root and move to a non-privileged account during runtime.

For my next trick, I'd like to write a signal handler so I can initiate a proper shutdown when a SIGINT or SIGHUP is caught.

My dilemma is this, I was in the process of implementing the sigalert struct in java when I came across a union. I've looked around the jna code, examples on the site, and whatever emails I could find and found nothing regarding this issue.

Could someone provide insight as to how I might handle a c union with JNA, or is this something that's not currently possible?

Cheers, Dennis P.