Hi,

I don't know if anybody has reported this.

There is a bug in utils/server.py that prevents the forking server
from running.

The bug is in line 209 and can be easily corrected.

It involves ForkingServer.def _handle_sigchld():

    @staticmethod
    def _handle_sigchld(signum, unused):
        try:
            while True:
                os.waitpid(-1, os.WNOHANG)
        except OSError:
            pass
        # re-register signal handler (see man signal(2), under
Portability)
        signal.signal(signal.SIGCHLD, self._handle_sigchld)

The last line uses self, but in a static method self is not available.
Therefore self must be replaced by the class name (ForkingServer).

So the correct version of ForkingServer.def _handle_sigchld() is:

    @staticmethod
    def _handle_sigchld(signum, unused):
        try:
            while True:
                os.waitpid(-1, os.WNOHANG)
        except OSError:
            pass
        # re-register signal handler (see man signal(2), under
Portability)
        signal.signal(signal.SIGCHLD, ForkingServer._handle_sigchld)


Greetings
Ruediger

Reply via email to