#65 Signal handling : YAJSW always sets -Xrs

All
closed-out-of-date
nobody
None
5
2013-12-20
2012-07-16
Anonymous
No

I've noticed that al the java services I start with YAJSW end up with -Xrs (setting the JVM to ignore OS signals as described at http://docs.oracle.com/javase/1.3/docs/tooldocs/solaris/java.html\) even though I do not set this in the jvm-opts of my service config.

Unfortunately this seems to mean that shutdown hooks are never driven, and we suspect it may be related to issues we've seen with java processes being left behind when the wrapper shuts down (though it may not be related).

Is it intentional that YAJSW always sets this flag? The doc on http://yajsw.sourceforge.net/YAJSW%20Configuration%20Parameters.html under wrapper.ignore_signals suggests it should only be turend on if "wrapper.java.additional.jvm-opts=-Xsr" is set (incidentally, there's a typo in the flag there - it should be Xrs).

If it is intended, is there any way we can ensure java processes started by YAJSW receive SIGHUP or SIGTERM signals and run their shutdown hooks?

Discussion

  • rzo

    rzo - 2012-07-16

    hello,

    -Xrs is set on purpose. Services should not be signaled.

    Otherwise the service may be terminated when a user logs off.

    The service should only be terminated by call to stopDaemon or similar.

    When the application is stopped the wrapper code invokes System.exit() from within the application which would trigger the execution of the java exit hooks.

    If this is not the case within your application, then we will have to analyze what is going on.

    Could you pls post or attach your log file and your configuration.

    YAJSW does not support wrapper.ignore_signals. Contrary to JSW YAJSW does, for now, not handle signals, since this requires sun specific api, which is avoided for critical functionalities.

    -- Ron

     
  • rzo

    rzo - 2013-12-20
    • status: open --> closed-out-of-date
    • Group: --> All
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks