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
bb6a0edc
Kaydet (Commit)
bb6a0edc
authored
Ock 21, 2007
tarafından
Peter Astrand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid O(N**2) bottleneck in _communicate_(). Fixes #1598181. Backport from rev. 53295.
üst
962e9165
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
subprocess.py
Lib/subprocess.py
+4
-3
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/subprocess.py
Dosyayı görüntüle @
bb6a0edc
...
...
@@ -1111,6 +1111,7 @@ class Popen(object):
read_set
.
append
(
self
.
stderr
)
stderr
=
[]
input_offset
=
0
while
read_set
or
write_set
:
rlist
,
wlist
,
xlist
=
select
.
select
(
read_set
,
write_set
,
[])
...
...
@@ -1118,9 +1119,9 @@ class Popen(object):
# When select has indicated that the file is writable,
# we can write up to PIPE_BUF bytes without risk
# blocking. POSIX defines PIPE_BUF >= 512
bytes_written
=
os
.
write
(
self
.
stdin
.
fileno
(),
input
[:
512
]
)
input
=
input
[
bytes_written
:]
if
not
input
:
bytes_written
=
os
.
write
(
self
.
stdin
.
fileno
(),
buffer
(
input
,
input_offset
,
512
)
)
input
_offset
+=
bytes_written
if
input_offset
>=
len
(
input
)
:
self
.
stdin
.
close
()
write_set
.
remove
(
self
.
stdin
)
...
...
Misc/NEWS
Dosyayı görüntüle @
bb6a0edc
...
...
@@ -143,6 +143,8 @@ Extension Modules
Library
-------
- Bug #1598181: Avoid O(N**2) bottleneck in subprocess communicate().
- Patch #1627441: close sockets properly in urllib2.
- Bug #1610795: ctypes.util.find_library works now on BSD systems.
...
...
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