Home | History | Annotate | Download | only in test

Lines Matching defs:fcntl

1 """Test program for the fcntl C module.

14 fcntl = import_module('fcntl')
43 fcntl.F_WRLCK, 0)
45 lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
49 lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
71 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
73 print 'Status from fcntl with O_NONBLOCK: ', rv
75 rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETLKW, lockdata)
77 print 'String from fcntl with F_SETLKW: ', repr(rv)
83 rv = fcntl.fcntl(self.f, fcntl.F_SETFL, os.O_NONBLOCK)
85 rv = fcntl.fcntl(self.f, fcntl.F_SETLKW, lockdata)
89 # Issue #1309352: fcntl shouldn't fail when the third arg fits in a
92 cmd = fcntl.F_NOTIFY
94 flags = fcntl.DN_MULTISHOT
99 fcntl.fcntl(fd, cmd, flags)