fcntl.fcntl()¶
-
fcntl.fcntl(fd, op[, arg])¶ Perform the operation op on file descriptor fd. The values used for op are operating system dependent, and are available as constants in the fcntl module, using the same names as used in the relevant C header files. The argument arg is optional, and defaults to 0; it may be an int or a string. If arg is given as a string, the return value of fcntl is a string of that length, containing the resulting value put in the arg buffer by the operating system. The length of the arg string is not allowed to exceed 1024 bytes. If the arg given is an integer or if none is specified, the result value is an integer corresponding to the return value of the fcntl call in the C code.