'Assert that in the main process, spawnProcess disables the garbage
collector, calls fork, closes the pipe file descriptors it created for
the child process, and calls waitpid.'

def _mockForkInParentTest(self):

    self.mockos.child = False
    cmd = '/mock/ouch'
    d = defer.Deferred()
    p = TrivialProcessProtocol(d)
    reactor.spawnProcess(p, cmd, ['ouch'], env=None, usePTY=False)
    self.assertEqual(set(self.mockos.closed), set([(-1), (-4), (-6)]))
    self.assertEqual(self.mockos.actions, [('fork', False), 'waitpid'])
