This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
There are three signals present in my application TERM , INT & ABRT that will shutdown our application gracefully.
I need to use a new signal that will do some special processing, but won't eventually shutdown the application and that the application will continue to work normally after that.
Whats the signal i should use. Any custom signal i can use ?? Also can anyone point me to some examples for this.
I will have a webservice (again in java) that will send this new signal to my already running application (standalone) to get some special processing done.
Terminate, Interrupt and Abort?
I guess the name of the signal could best to reflect whatever it is this "special processing" entails.
Or maybe URG for urgent processing of some generic thing at the highest priority?
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Are you talking about Unix signals or is this a custom system of signals?
As far as I know, since Unix signals are platform-specific (they don't exist on Windows, for example), the standard Java library does not support them. So I'm curious how your application is handling these, if they are indeed Unix signals.
I think I will use SIGUSR1 for handling custom user signals. (sun.misc.Signal) My code will run only on RHEL5 so i am not worried of doing signal handing for Windows.
Is there a cleaner way to send the signal to one java program from another.
Currently I use : Runtime.getRuntime().exec("kill -USR1 6345"); //where 6345 is the process id of the targeted program