This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients davin, pitrou, sbt
Date 2017-06-07.15:21:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The documentation for multiprocessing.exitcode says:
    The child’s exit code. This will be None if the process has not yet terminated. A negative value -N indicates that the child was terminated by signal N.

This is true for the "fork" method, but not "forkserver" where a child terminated by a signal will get an exitcode of 255.  This is because forkserver relies on the child writing its own exit code in a pipe, which obviously doesn't work if it was killed (255 is simply a fallback value).

See forkserver's Popen.poll():

    def poll(self, flag=os.WNOHANG):
        if self.returncode is None:
            from multiprocessing.connection import wait
            timeout = 0 if flag == os.WNOHANG else None
            if not wait([self.sentinel], timeout):
                return None
                self.returncode = forkserver.read_unsigned(self.sentinel)
            except (OSError, EOFError):
                # The process ended abnormally perhaps because of a signal
                self.returncode = 255
        return self.returncode
Date User Action Args
2017-06-07 15:21:05pitrousetrecipients: + pitrou, sbt, davin
2017-06-07 15:21:05pitrousetmessageid: <>
2017-06-07 15:21:05pitroulinkissue30589 messages
2017-06-07 15:21:05pitroucreate