This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schmir
Recipients gvanrossum, schmir
Date 2008-03-26.22:01:32
SpamBayes Score 0.5578613
Marked as misclassified No
Message-id <1206568893.59.0.946561197925.issue1503@psf.upfronthosting.co.za>
In-reply-to
Content
I just double checked with the following program:
#! /usr/bin/env python

import os
import fcntl
import socket


def isnonblocking(fd):
    
    return bool(fcntl.fcntl(fd, fcntl.F_GETFL, 0) & os.O_NONBLOCK)

def main():
    s=socket.socket()
    
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.bind(("0.0.0.0", 8000))
    s.listen(5)

    s.settimeout(30)
    
    
    print "server isnonblocking:", isnonblocking(s.fileno())
    client, addr = s.accept()
    print "client isnonblocking:", isnonblocking(client.fileno())
    
    
        
if __name__=="__main__":
    main()



on my g4 mac it prints:
~/ python serv.py                                                 
ralf@mini ok
server isnonblocking: True
client isnonblocking: True


on linux:
~/ python mini/serv.py                                           
ralf@rat64 ok
server isnonblocking: True
client isnonblocking: False
History
Date User Action Args
2008-03-26 22:01:33schmirsetspambayes_score: 0.557861 -> 0.5578613
recipients: + schmir, gvanrossum
2008-03-26 22:01:33schmirsetspambayes_score: 0.557861 -> 0.557861
messageid: <1206568893.59.0.946561197925.issue1503@psf.upfronthosting.co.za>
2008-03-26 22:01:32schmirlinkissue1503 messages
2008-03-26 22:01:32schmircreate