|
From: Yazbek, D. \(Daniel\) <dy...@av...> - 2006-09-05 03:04:11
|
Hi all,
=20
We are attempting to modify wrapper so that a SIGHUP can be handled by
java code, I am after some help/suggestions.
=20
Here is what I've done so far:
=20
Modified WrapperManager.java with:
public static final int WRAPPER_CTRL_SIGHUP_EVENT =3D 205;
Recompiled the code, javah added this definition into
org_tanukisoftware_wrapper_WrapperManager.h
=20
Modified wrapper_unix.c with:
- added case in getSignalName(int signo)
- written a handleHangup(int sig_num) function, with
deceleration:
void handleHangup(int sig_num) {
=20
/* Ignore any other signals while in this handler. */
signal(SIGHUP, SIG_IGN);
=20
handleCommon("HUP");
=20
signal(SIGHUP, handleHangup);
}
- Modified wrapperInitialize() to support SIGHUP
=20
Modified wrapperjni_unix.c with:
- added a handleHandup(int sig_num) function:
void handleHangup(int sig_num) {
signal(SIGHUP, handleHangup);
WrapperJNIHandleSignal(org_tanukisoftware_wrapper_WrapperManager_WRAPPER
_CTRL_SIGHUP_EVENT);
}
- Set the above handler for a SIGHUP in the init function
=20
So, I guess I am missing something. I cannot get the SIGHUP in the java
application from the controlEvent(int arg0) method of my class that
implements WrapperListener.
=20
However, when I send a sighup, I get "HUP Trapped" in the log file,
which is being generated by
handleCommon(const char* sigName)
=20
I am not familiar with the architecture and a newbie to wrapper...
Does anyone have any suggestions on where I should be heading towards
from here?
=20
Thanks.
=20
-Dan.
|