def processEnded(self, status):
        """
        This is called when the child terminates.
        """
        self.status = status
        self.lostProcess += 1
        self.pid = None
        self._callProcessExited(self._getReason(status))
        self.maybeCallProcessEnded()

        This is called when the child terminates.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/_baseprocess.py