Back to index

python3.2  3.2.2
Public Member Functions
test.test_socket.CloexecConstantTest Class Reference

List of all members.

Public Member Functions

def test_SOCK_CLOEXEC

Detailed Description

Definition at line 1976 of file test_socket.py.


Member Function Documentation

Definition at line 1977 of file test_socket.py.

01977 
01978     def test_SOCK_CLOEXEC(self):
01979         v = linux_version()
01980         if v < (2, 6, 28):
01981             self.skipTest("Linux kernel 2.6.28 or higher required, not %s"
01982                           % ".".join(map(str, v)))
01983         with socket.socket(socket.AF_INET,
01984                            socket.SOCK_STREAM | socket.SOCK_CLOEXEC) as s:
01985             self.assertTrue(s.type & socket.SOCK_CLOEXEC)
01986             self.assertTrue(fcntl.fcntl(s, fcntl.F_GETFD) & fcntl.FD_CLOEXEC)
01987 
01988 
01989 @unittest.skipUnless(hasattr(socket, "SOCK_NONBLOCK"),
                     "SOCK_NONBLOCK not defined")

Here is the call graph for this function:


The documentation for this class was generated from the following file: