Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d9dbf493
Kaydet (Commit)
d9dbf493
authored
Eki 25, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
accepted sockets shouldn't inherit the SOCK_NONBLOCK flag (closes #25471)
üst
458123bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
socket.py
Lib/socket.py
+5
-1
test_socket.py
Lib/test/test_socket.py
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/socket.py
Dosyayı görüntüle @
d9dbf493
...
@@ -185,7 +185,11 @@ class socket(_socket.socket):
...
@@ -185,7 +185,11 @@ class socket(_socket.socket):
For IP sockets, the address info is a pair (hostaddr, port).
For IP sockets, the address info is a pair (hostaddr, port).
"""
"""
fd
,
addr
=
self
.
_accept
()
fd
,
addr
=
self
.
_accept
()
sock
=
socket
(
self
.
family
,
self
.
type
,
self
.
proto
,
fileno
=
fd
)
# If our type has the SOCK_NONBLOCK flag, we shouldn't pass it onto the
# new socket. We do not currently allow passing SOCK_NONBLOCK to
# accept4, so the returned socket is always blocking.
type
=
self
.
type
&
~
globals
()
.
get
(
"SOCK_NONBLOCK"
,
0
)
sock
=
socket
(
self
.
family
,
type
,
self
.
proto
,
fileno
=
fd
)
# Issue #7995: if no default timeout is set and the listening
# Issue #7995: if no default timeout is set and the listening
# socket had a (non-zero) timeout, force the new socket in blocking
# socket had a (non-zero) timeout, force the new socket in blocking
# mode to override platform-specific socket flags inheritance.
# mode to override platform-specific socket flags inheritance.
...
...
Lib/test/test_socket.py
Dosyayı görüntüle @
d9dbf493
...
@@ -3863,6 +3863,7 @@ class NonBlockingTCPTests(ThreadedTCPSocketTest):
...
@@ -3863,6 +3863,7 @@ class NonBlockingTCPTests(ThreadedTCPSocketTest):
read
,
write
,
err
=
select
.
select
([
self
.
serv
],
[],
[])
read
,
write
,
err
=
select
.
select
([
self
.
serv
],
[],
[])
if
self
.
serv
in
read
:
if
self
.
serv
in
read
:
conn
,
addr
=
self
.
serv
.
accept
()
conn
,
addr
=
self
.
serv
.
accept
()
self
.
assertIsNone
(
conn
.
gettimeout
())
conn
.
close
()
conn
.
close
()
else
:
else
:
self
.
fail
(
"Error trying to do accept after select."
)
self
.
fail
(
"Error trying to do accept after select."
)
...
...
Misc/NEWS
Dosyayı görüntüle @
d9dbf493
...
@@ -96,6 +96,9 @@ Core and Builtins
...
@@ -96,6 +96,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #25471: Sockets returned from accept() shouldn'
t
appear
to
be
nonblocking
.
-
Issue
#
25441
:
asyncio
:
Raise
error
from
drain
()
when
socket
is
closed
.
-
Issue
#
25441
:
asyncio
:
Raise
error
from
drain
()
when
socket
is
closed
.
-
Issue
#
25411
:
Improved
Unicode
support
in
SMTPHandler
through
better
use
of
-
Issue
#
25411
:
Improved
Unicode
support
in
SMTPHandler
through
better
use
of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment