'If the C{os.write} call to the status pipe raises an B{EINTR} error,
the process child retries to write.'

def test_successEINTR(self):

    written = []
    def raisingWrite(fd, data):
        written.append((fd, data))
        if (len(written) == 1):
            raise IOError(errno.EINTR)
    self.mockos.write = raisingWrite
    with AlternateReactor(FakeDaemonizingReactor()):
        self.runner.postApplication()
    self.assertEqual(self.mockos.actions, [('chdir', '.'), ('umask', 63), ('fork', True), 'setsid', ('fork', True), ('unlink', 'twistd.pid')])
    self.assertEqual(self.mockos.closed, [(-3), (-2)])
    self.assertEqual([((-2), '0'), ((-2), '0')], written)
