Issue #947 resolved

Jython: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Signal already used by VM: SIGUSR1

Anonymous created an issue

It seems the JVM doesn't play nicely with the SIGUSR1 signal. One workaround is as follow:

{{{ Index: cherrypy/process/plugins.py =================================================================== --- cherrypy/process/plugins.py (révision 2486) +++ cherrypy/process/plugins.py (copie de travail) @@ -80,6 +80,11 @@ 'SIGHUP': self.handle_SIGHUP, 'SIGUSR1': self.bus.graceful, } + + if sys.platform[:4] == 'java': + del self.handlers['SIGUSR1'] + self.handlers['SIGUSR2'] = self.bus.graceful + self.bus.log("SIGUSR1 cannot be set on the JVM platform. Using SIGUSR2 instead.")

     self._previous_handlers = {}

}}}

Using SIGUSR2 doesn't seem to be a problem on the JVM.

Reported by lawouach

Comments (5)

  1. Anonymous

    Stupid wiki formatting!

    Index: cherrypy/process/plugins.py
    ===================================================================
    --- cherrypy/process/plugins.py (révision 2486)
    +++ cherrypy/process/plugins.py (copie de travail)
    @@ -80,6 +80,11 @@
                              'SIGHUP': self.handle_SIGHUP,
                              'SIGUSR1': self.bus.graceful,
                              }
    +
    +        if sys.platform[:4] == 'java':
    +            del self.handlers['SIGUSR1']
    +            self.handlers['SIGUSR2'] = self.bus.graceful
    +            self.bus.log("SIGUSR1 cannot be set on the JVM platform. Using SIGUSR2 instead.")
    
             self._previous_handlers = {}
    
  2. Log in to comment