def _exit(self, code):
        """
        Fake C{os._exit}. Save the action, set the C{self.exited} flag, and
        raise C{SystemError}.
        """
        self.actions.append(('exit', code))
        self.exited = True
        # Don't forget to raise an error, or you'll end up in parent
        # code path.
        raise SystemError()

        Fake C{os._exit}. Save the action, set the C{self.exited} flag, and
        raise C{SystemError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_process.py