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
8c826b77
Kaydet (Commit)
8c826b77
authored
Haz 19, 2009
tarafından
Facundo Batista
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6274. Fixed a potential FD leak in subprocess.py.
üst
5fe420e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
subprocess.py
Lib/subprocess.py
+9
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/subprocess.py
Dosyayı görüntüle @
8c826b77
...
...
@@ -1056,6 +1056,8 @@ class Popen(object):
# The first char specifies the exception type: 0 means
# OSError, 1 means some other error.
errpipe_read
,
errpipe_write
=
os
.
pipe
()
try
:
try
:
self
.
_set_cloexec_flag
(
errpipe_write
)
gc_was_enabled
=
gc
.
isenabled
()
...
...
@@ -1129,7 +1131,10 @@ class Popen(object):
# Parent
if
gc_was_enabled
:
gc
.
enable
()
finally
:
# be sure the FD is closed no matter what
os
.
close
(
errpipe_write
)
if
p2cread
is
not
None
and
p2cwrite
is
not
None
:
os
.
close
(
p2cread
)
if
c2pwrite
is
not
None
and
c2pread
is
not
None
:
...
...
@@ -1138,8 +1143,11 @@ class Popen(object):
os
.
close
(
errwrite
)
# Wait for exec to fail or succeed; possibly raising exception
data
=
os
.
read
(
errpipe_read
,
1048576
)
# Exceptions limited to 1 MB
data
=
os
.
read
(
errpipe_read
,
1048576
)
# Exception limited to 1M
finally
:
# be sure the FD is closed no matter what
os
.
close
(
errpipe_read
)
if
data
!=
""
:
os
.
waitpid
(
self
.
pid
,
0
)
child_exception
=
pickle
.
loads
(
data
)
...
...
Misc/NEWS
Dosyayı görüntüle @
8c826b77
...
...
@@ -327,6 +327,8 @@ Core and Builtins
Library
-------
- Issue #6274: Fixed possible file descriptors leak in subprocess.py
- Issue #6189: Restored compatibility of subprocess.py with Python 2.2.
- Issue #6287: Added the license field in Distutils documentation.
...
...
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