'Test that reapProcess doesn\'t log anything when waitpid raises a
C{OSError} with errno C{ECHILD}.'

def test_mockErrorECHILDInReapProcess(self):

    self.mockos.child = False
    cmd = '/mock/ouch'
    self.mockos.waitChild = (0, 0)
    d = defer.Deferred()
    p = TrivialProcessProtocol(d)
    proc = reactor.spawnProcess(p, cmd, ['ouch'], env=None, usePTY=False)
    self.assertEqual(self.mockos.actions, [('fork', False), 'waitpid'])
    self.mockos.raiseWaitPid = OSError()
    self.mockos.raiseWaitPid.errno = errno.ECHILD
    proc.reapProcess()
