File indexing completed on 2024-04-28 15:53:57

0001 # AUTO-GENERATED FILE -- DO NOT EDIT
0002 
0003 """ This module performs file control and I/O control on file 
0004 descriptors.  It is an interface to the fcntl() and ioctl() Unix
0005 routines.  File descriptors can be obtained with the fileno() method of
0006 a file or socket object. """
0007 
0008 DN_ACCESS = 1
0009 DN_ATTRIB = 32
0010 DN_CREATE = 4
0011 DN_DELETE = 8
0012 DN_MODIFY = 2
0013 DN_MULTISHOT = 2147483648
0014 DN_RENAME = 16
0015 FASYNC = 8192
0016 FD_CLOEXEC = 1
0017 F_DUPFD = 0
0018 F_EXLCK = 4
0019 F_GETFD = 1
0020 F_GETFL = 3
0021 F_GETLEASE = 1025
0022 F_GETLK = 5
0023 F_GETLK64 = 5
0024 F_GETOWN = 9
0025 F_GETSIG = 11
0026 F_NOTIFY = 1026
0027 F_RDLCK = 0
0028 F_SETFD = 2
0029 F_SETFL = 4
0030 F_SETLEASE = 1024
0031 F_SETLK = 6
0032 F_SETLK64 = 6
0033 F_SETLKW = 7
0034 F_SETLKW64 = 7
0035 F_SETOWN = 8
0036 F_SETSIG = 10
0037 F_SHLCK = 8
0038 F_UNLCK = 2
0039 F_WRLCK = 1
0040 I_ATMARK = 21279
0041 I_CANPUT = 21282
0042 I_CKBAND = 21277
0043 I_FDINSERT = 21264
0044 I_FIND = 21259
0045 I_FLUSH = 21253
0046 I_FLUSHBAND = 21276
0047 I_GETBAND = 21278
0048 I_GETCLTIME = 21281
0049 I_GETSIG = 21258
0050 I_GRDOPT = 21255
0051 I_GWROPT = 21268
0052 I_LINK = 21260
0053 I_LIST = 21269
0054 I_LOOK = 21252
0055 I_NREAD = 21249
0056 I_PEEK = 21263
0057 I_PLINK = 21270
0058 I_POP = 21251
0059 I_PUNLINK = 21271
0060 I_PUSH = 21250
0061 I_RECVFD = 21262
0062 I_SENDFD = 21265
0063 I_SETCLTIME = 21280
0064 I_SETSIG = 21257
0065 I_SRDOPT = 21254
0066 I_STR = 21256
0067 I_SWROPT = 21267
0068 I_UNLINK = 21261
0069 LOCK_EX = 2
0070 LOCK_MAND = 32
0071 LOCK_NB = 4
0072 LOCK_READ = 64
0073 LOCK_RW = 192
0074 LOCK_SH = 1
0075 LOCK_UN = 8
0076 LOCK_WRITE = 128
0077 __package__ = None
0078 
0079 def fcntl(fd, opt, arg=None):
0080   """ fcntl(fd, opt, [arg])
0081   
0082   Perform the requested operation on file descriptor fd.  The operation
0083   is defined by op and is operating system dependent.  These constants are
0084   available from the fcntl module.  The argument arg is optional, and
0085   defaults to 0; it may be an int or a string.  If arg is given as a string,
0086   the return value of fcntl is a string of that length, containing the
0087   resulting value put in the arg buffer by the operating system.  The length
0088   of the arg string is not allowed to exceed 1024 bytes.  If the arg given
0089   is an integer or if none is specified, the result value is an integer
0090   corresponding to the return value of the fcntl call in the C code. """
0091   pass
0092 
0093 def flock(fd, operation):
0094   """ flock(fd, operation)
0095   
0096   Perform the lock operation op on file descriptor fd.  See the Unix 
0097   manual page for flock(3) for details.  (On some systems, this function is
0098   emulated using fcntl().) """
0099   pass
0100 
0101 def ioctl(fd, opt, arg=None, mutate_flag=None):
0102   """ ioctl(fd, opt[, arg[, mutate_flag]])
0103   
0104   Perform the requested operation on file descriptor fd.  The operation is
0105   defined by opt and is operating system dependent.  Typically these codes are
0106   retrieved from the fcntl or termios library modules.
0107   
0108   The argument arg is optional, and defaults to 0; it may be an int or a
0109   buffer containing character data (most likely a string or an array). 
0110   
0111   If the argument is a mutable buffer (such as an array) and if the
0112   mutate_flag argument (which is only allowed in this case) is true then the
0113   buffer is (in effect) passed to the operating system and changes made by
0114   the OS will be reflected in the contents of the buffer after the call has
0115   returned.  The return value is the integer returned by the ioctl system
0116   call.
0117   
0118   If the argument is a mutable buffer and the mutable_flag argument is not
0119   passed or is false, the behavior is as if a string had been passed.  This
0120   behavior will change in future releases of Python.
0121   
0122   If the argument is an immutable buffer (most likely a string) then a copy
0123   of the buffer is passed to the operating system and the return value is a
0124   string of the same length containing whatever the operating system put in
0125   the buffer.  The length of the arg buffer in this case is not allowed to
0126   exceed 1024 bytes.
0127   
0128   If the arg given is an integer or if none is specified, the result value is
0129   an integer corresponding to the return value of the ioctl call in the C
0130   code. """
0131   pass
0132 
0133 def lockf():
0134   """ lockf (fd, operation, length=0, start=0, whence=0)
0135   
0136   This is essentially a wrapper around the fcntl() locking calls.  fd is the
0137   file descriptor of the file to lock or unlock, and operation is one of the
0138   following values:
0139   
0140       LOCK_UN - unlock
0141       LOCK_SH - acquire a shared lock
0142       LOCK_EX - acquire an exclusive lock
0143   
0144   When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with
0145   LOCK_NB to avoid blocking on lock acquisition.  If LOCK_NB is used and the
0146   lock cannot be acquired, an IOError will be raised and the exception will
0147   have an errno attribute set to EACCES or EAGAIN (depending on the operating
0148   system -- for portability, check for either value).
0149   
0150   length is the number of bytes to lock, with the default meaning to lock to
0151   EOF.  start is the byte offset, relative to whence, to that the lock
0152   starts.  whence is as with fileobj.seek(), specifically:
0153   
0154       0 - relative to the start of the file (SEEK_SET)
0155       1 - relative to the current buffer position (SEEK_CUR)
0156       2 - relative to the end of the file (SEEK_END) """
0157   pass
0158