Since Linux 2.6.27, it's possible to set SOCK_NONBLOCK directly at the creation of the socket (using socket() and accept4()). So you don't need any extra call. I implemented something similar for SOCK_CLOEXEC flag to implement the PEP 433. See for example: http://hg.python.org/features/pep-433/file/1097ffc652f4/Modules/socketmodule... and: http://hg.python.org/features/pep-433/file/1097ffc652f4/Modules/socketmodule... The PEP 433 (Easier suppression of file descriptor inheritance): http://python.org/dev/peps/pep-0433/ But I added a new keyword argument to socket.socket() and socket.socket.accept() for that. I don't know if you can do something similar without adding a new argument. -- Instead of two calls to fcntl() (2 syscalls), you can also use "int opt = 1; ioctl(fd, FIONBIO, &opt);" (1 syscall). Victor