(self)
| 6609 | |
| 6610 | @unittest.skipIf(fcntl is None, "need fcntl") |
| 6611 | def test_get_inheritable_cloexec(self): |
| 6612 | sock = socket.socket() |
| 6613 | with sock: |
| 6614 | fd = sock.fileno() |
| 6615 | self.assertEqual(sock.get_inheritable(), False) |
| 6616 | |
| 6617 | # clear FD_CLOEXEC flag |
| 6618 | flags = fcntl.fcntl(fd, fcntl.F_GETFD) |
| 6619 | flags &= ~fcntl.FD_CLOEXEC |
| 6620 | fcntl.fcntl(fd, fcntl.F_SETFD, flags) |
| 6621 | |
| 6622 | self.assertEqual(sock.get_inheritable(), True) |
| 6623 | |
| 6624 | @unittest.skipIf(fcntl is None, "need fcntl") |
| 6625 | def test_set_inheritable_cloexec(self): |
nothing calls this directly
no test coverage detected