Bugs item #1515839, was opened at 2006-07-02 16:05 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1515839&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Jari Kirma (kirma) Assigned to: Nobody/Anonymous (nobody) Summary: socket timeout inheritance on accept Initial Comment: Socket objects returned by socket.accept() get their blocking and timeout setting(s) from socket.defaulttimeout. This can be in conflict with reality of the (non-)blocking mode of actual OS-level socket they use. For instance, FreeBSD sockets inherit their socket options from the parent socket on accept(2) system call, and thus a socket object with defined socket timeout and default defaulttimeout returns a socket object that seems to be blocking, non-timeout socket, but the underlying OS socket is actually in nonblocking mode, which can cause read/recv and write/send operations to behave unexpectedly. Even worse, POSIX/SUSv3 doesn't explicitly require socket option inheritance (http://www.opengroup.org/onlinepubs/009695399/functions/accept.html). The socket library should explicitly set the socket timeout mode (either to defaulttimeout, or with accompanying documentation, inherit the value from socket object passed to accept()) and modify the OS socket options accordingly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1515839&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com