error code description wsaetoomanyrefs wsaeusers wsaewouldblock wsanotinitialised too many references to kernel object quota exceeded resource temporarily unavailable successful wsa startup not performed network subsystem not available winsock dll version out of range wsasysnotready wsavernotsupported fcntl the fcntl module performs file and / control on unix file descriptors file descriptors can be obtained using the fileno(method of file or socket object fcntl(fdcmd [arg]performs commandcmdon an open file descriptorfd cmd is an integer command code arg is an optional argument that' either an integer or string if arg is passed as an integerthe return value of this function is an integer if arg is stringit' interpreted as binary data structureand the return value of the call is the contents of the buffer converted back into string object in this casethe supplied argument and return value should be less than , bytes to avoid possible data corruption the following commands are availablecommand description f_dupfd duplicates file descriptor arg is the lowest number that the new file descriptor can assume similar to the os dup(system call sets the close-on-exec flag to arg ( or if setthe file is closed on an exec(system call returns the close-on-exec flag sets status flags to argwhich is the bitwise or of the followingo_ndelay--nonblocking / (system vo_append--append mode (system vo_sync--synchronous write (system vfndelay--nonblocking / (bsdfappend--append mode (bsdfasync--sends sigio signal to process group when / is possible (bsdgets status flags as set by f_setfl gets process id or process group id set to receive sigio and sigurg signals (bsdsets process id or process group id to receive sigio and sigurg signals (bsdreturns flock structure used in file-locking operations locks filereturning - if the file is already locked locks file but waits if the lock cannot be acquired f_setfd f_getfd f_setfl f_getfl f_getown f_setown f_getlk f_setlk f_setlkw lib fl ff