Jump to content
Excelsior Forums
sauri

Shutdown hooks

Recommended Posts

Hi,

I have several applications that need to run for quite some time and are thus started using 'nohup' und stopped using 'kill', while using shutdown hooks to do some necessary cleanup stuff. Now after I compiled them with Jet, these hooks wont fire anymore when I kill the process. Is this behaviour intended, or is there a way to use shutdown hooks somehow that I missed?

Thanks

Share this post


Link to post
Share on other sites

Please let us know JET version you are using and Linux version (kernel version, glibc version and the output of command "uname -a").

Share this post


Link to post
Share on other sites

I'm using Jet 4.5 on

Linux pool01 2.6.14-hardened-r8 #1 SMP Tue Oct 31 00:03:39 GMT 2006 x86_64 Intel® Pentium® 4 CPU 2.80GHz GNU/Linux

with glibc-2.3.6-r4.

And the same problem exists for example on a default Ubuntu 6.06 running in VMWare.

Is there some special way I'm supposed to use to kill the application that I didnt get, in order to fire the hooks?

Share this post


Link to post
Share on other sites

It is known problem. I will inform you as soon it is fixed (not more than 1.5-2 weeks).

Just now shutdown hooks work on Linux only for normal termination not for "kill" termination.

As temporal workaround, I would recommend you to implement your own "kill" program that will inform main program to be terminated (like tomcat stop).

Share this post


Link to post
Share on other sites

We have fixed this problem. Contact Excelsior JET support team at java@excelsior-usa.com to get the hotfix fixing this problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×