@@ -309,16 +309,16 @@ def create_unix_server(self, protocol_factory, path=None, *,
309309 return server
310310
311311
312- if hasattr (os , 'set_blocking' ):
313- def _set_nonblocking (fd ):
314- os .set_blocking (fd , False )
315- else :
316- import fcntl
312+ # if hasattr(os, 'set_blocking'):
313+ # def _set_nonblocking(fd):
314+ # os.set_blocking(fd, False)
315+ # else:
316+ # import fcntl
317317
318- def _set_nonblocking (fd ):
319- flags = fcntl .fcntl (fd , fcntl .F_GETFL )
320- flags = flags | os .O_NONBLOCK
321- fcntl .fcntl (fd , fcntl .F_SETFL , flags )
318+ # def _set_nonblocking(fd):
319+ # flags = fcntl.fcntl(fd, fcntl.F_GETFL)
320+ # flags = flags | os.O_NONBLOCK
321+ # fcntl.fcntl(fd, fcntl.F_SETFL, flags)
322322
323323
324324class _UnixReadPipeTransport (transports .ReadTransport ):
@@ -659,20 +659,20 @@ def _call_connection_lost(self, exc):
659659 self ._loop = None
660660
661661
662- if hasattr (os , 'set_inheritable' ):
663- # Python 3.4 and newer
664- _set_inheritable = os .set_inheritable
665- else :
666- import fcntl
667-
668- def _set_inheritable (fd , inheritable ):
669- cloexec_flag = getattr (fcntl , 'FD_CLOEXEC' , 1 )
670-
671- old = fcntl .fcntl (fd , fcntl .F_GETFD )
672- if not inheritable :
673- fcntl .fcntl (fd , fcntl .F_SETFD , old | cloexec_flag )
674- else :
675- fcntl .fcntl (fd , fcntl .F_SETFD , old & ~ cloexec_flag )
662+ # if hasattr(os, 'set_inheritable'):
663+ # # Python 3.4 and newer
664+ # _set_inheritable = os.set_inheritable
665+ # else:
666+ # import fcntl
667+ #
668+ # def _set_inheritable(fd, inheritable):
669+ # cloexec_flag = getattr(fcntl, 'FD_CLOEXEC', 1)
670+ #
671+ # old = fcntl.fcntl(fd, fcntl.F_GETFD)
672+ # if not inheritable:
673+ # fcntl.fcntl(fd, fcntl.F_SETFD, old | cloexec_flag)
674+ # else:
675+ # fcntl.fcntl(fd, fcntl.F_SETFD, old & ~cloexec_flag)
676676
677677
678678class _UnixSubprocessTransport (base_subprocess .BaseSubprocessTransport ):
0 commit comments