gcj: SignalListener, process pid, ...
Erik Poupaert
erik.poupaert@freestyler-toolkit.org
Mon Sep 29 21:37:00 GMT 2003
I've compiled the java posix natively (well, the parts needed to operate
Signal.java), and it works properly with GCJ.
The signal-listening thread can be made to listen to SIGINT, SIGQUIT, SIGUSR1,
SIGUSR2, and SIGTERM (nothing else, though).
That should be ample enough to control linux daemons with, if it weren't for the fact
that the traditional SIGHUP signal is missing. While the library permits listening to
SIGHUP (and SIGDANGER(?)), libgcj unfortunately prevents somehow the signal-listening
thread to respond to it.(Why?)
There is a new issue though. Only one of the threads in the process (the
signal-listening one) will respond to these signals correctly. The other ones
won't(which is ok). I know from the native code what its "pthread_t" is. How to find
its"pid"? Can I use the thread's "pthread_t" to look up its corresponding "pid"?
By the way, they were so kind to license this library under the LGPL, so
if anybody wants my patches ...
(http://www.bmsi.com/java/posix/package.html)
More information about the Java
mailing list