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
79f561d1
Kaydet (Commit)
79f561d1
authored
May 15, 2016
tarafından
Martin Panter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26870: Poll() also fails on OS X; try select()
Also work around separate Open BSD bug with kill() of a zombie.
üst
2e1d8683
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
test_readline.py
Lib/test/test_readline.py
+13
-6
No files found.
Lib/test/test_readline.py
Dosyayı görüntüle @
79f561d1
...
...
@@ -126,13 +126,20 @@ def run_pty(script, input=b"dummy input\r"):
os
.
close
(
slave
)
with
ExitStack
()
as
cleanup
:
cleanup
.
enter_context
(
proc
)
cleanup
.
callback
(
proc
.
terminate
)
def
terminate
(
proc
):
try
:
proc
.
terminate
()
except
ProcessLookupError
:
# Workaround for Open/Net BSD bug (Issue 16762)
pass
cleanup
.
callback
(
terminate
,
proc
)
cleanup
.
callback
(
os
.
close
,
master
)
# Avoid using DefaultSelector, because it may choose a kqueue()
# implementation, which does not work with pseudo-terminals on OS X
# < 10.9 (Issue 20365) and Open BSD (Issue 20667).
sel
=
getattr
(
selectors
,
"PollSelector"
,
selectors
.
DefaultSelector
)()
cleanup
.
enter_context
(
sel
)
# Avoid using DefaultSelector and PollSelector. Kqueue() does not
# work with pseudo-terminals on OS X < 10.9 (Issue 20365) and Open
# BSD (Issue 20667). Poll() does not work with OS X 10.6 or 10.4
# either (Issue 20472). Hopefully the file descriptor is low enough
# to use with select().
sel
=
cleanup
.
enter_context
(
selectors
.
SelectSelector
())
sel
.
register
(
master
,
selectors
.
EVENT_READ
|
selectors
.
EVENT_WRITE
)
os
.
set_blocking
(
master
,
False
)
while
True
:
...
...
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