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
7ef909cd
Kaydet (Commit)
7ef909cd
authored
May 05, 2012
tarafından
Richard Oudkerk
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for issue 14725 for 3.2 branch
üst
16f6f833
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
connection.py
Lib/multiprocessing/connection.py
+4
-1
test_multiprocessing.py
Lib/test/test_multiprocessing.py
+17
-0
win32_functions.c
Modules/_multiprocessing/win32_functions.c
+1
-0
No files found.
Lib/multiprocessing/connection.py
Dosyayı görüntüle @
7ef909cd
...
...
@@ -360,7 +360,10 @@ if sys.platform == 'win32':
try
:
win32
.
ConnectNamedPipe
(
handle
,
win32
.
NULL
)
except
WindowsError
as
e
:
if
e
.
args
[
0
]
!=
win32
.
ERROR_PIPE_CONNECTED
:
# ERROR_NO_DATA can occur if a client has already connected,
# written data and then disconnected -- see Issue 14725.
if
e
.
args
[
0
]
not
in
(
win32
.
ERROR_PIPE_CONNECTED
,
win32
.
ERROR_NO_DATA
):
raise
return
_multiprocessing
.
PipeConnection
(
handle
)
...
...
Lib/test/test_multiprocessing.py
Dosyayı görüntüle @
7ef909cd
...
...
@@ -1732,6 +1732,23 @@ class _TestListenerClient(BaseTestCase):
self
.
assertEqual
(
conn
.
recv
(),
'hello'
)
p
.
join
()
l
.
close
()
def
test_issue14725
(
self
):
l
=
self
.
connection
.
Listener
()
p
=
self
.
Process
(
target
=
self
.
_test
,
args
=
(
l
.
address
,))
p
.
daemon
=
True
p
.
start
()
time
.
sleep
(
1
)
# On Windows the client process should by now have connected,
# written data and closed the pipe handle by now. This causes
# ConnectNamdedPipe() to fail with ERROR_NO_DATA. See Issue
# 14725.
conn
=
l
.
accept
()
self
.
assertEqual
(
conn
.
recv
(),
'hello'
)
conn
.
close
()
p
.
join
()
l
.
close
()
#
# Test of sending connection and socket objects between processes
#
...
...
Modules/_multiprocessing/win32_functions.c
Dosyayı görüntüle @
7ef909cd
...
...
@@ -244,6 +244,7 @@ create_win32_namespace(void)
Py_INCREF
(
&
Win32Type
);
WIN32_CONSTANT
(
F_DWORD
,
ERROR_ALREADY_EXISTS
);
WIN32_CONSTANT
(
F_DWORD
,
ERROR_NO_DATA
);
WIN32_CONSTANT
(
F_DWORD
,
ERROR_PIPE_BUSY
);
WIN32_CONSTANT
(
F_DWORD
,
ERROR_PIPE_CONNECTED
);
WIN32_CONSTANT
(
F_DWORD
,
ERROR_SEM_TIMEOUT
);
...
...
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