2013/1/19 Peter Portante <peter.a.porta...@gmail.com>: > Hello folks, > > I noticed while stracing a process that sock.setblocking() calls always > result in pairs of fcntl() calls on Linux. Checking 2.6.8, 2.7.3, and 3.3.0 > Modules/socketmodule.c, the code seems to use the following (unless I have > missed something): > > delay_flag = fcntl(s->sock_fd, F_GETFL, 0); > if (block) > delay_flag &= (~O_NONBLOCK); > else > delay_flag |= O_NONBLOCK; > fcntl(s->sock_fd, F_SETFL, delay_flag); > > Perhaps a check to see the flags changed might be worth making?
Considering most sockets are only set to blocking once, this doesn't seem very useful. -- Regards, Benjamin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com