def test_successInParent(self):
        """
        The parent process initiating the C{daemonize} call reads data from the
        status pipe and then exit the process.
        """
        self.mockos.child = False
        self.mockos.readData = b"0"
        with AlternateReactor(FakeDaemonizingReactor()):
            self.assertRaises(SystemError, self.runner.postApplication)
        self.assertEqual(
            self.mockos.actions,
            [('chdir', '.'), ('umask', 0o077), ('fork', True),
             ('read', -1, 100), ('exit', 0), ('unlink', 'twistd.pid')])
        self.assertEqual(self.mockos.closed, [-1])

        The parent process initiating the C{daemonize} call reads data from the
        status pipe and then exit the process.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py