'A file descriptor passed to L{fdesc._unsetCloseOnExec} is inherited by
a new process image created with one of the exec family of functions.'

def test_unsetCloseOnExec(self):

    with open(self.mktemp(), 'wb') as fObj:
        fdesc._setCloseOnExec(fObj.fileno())
        fdesc._unsetCloseOnExec(fObj.fileno())
        status = self._execWithFileDescriptor(fObj)
        self.assertTrue(os.WIFEXITED(status))
        self.assertEqual(os.WEXITSTATUS(status), 20)
