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
d3a345a2
Kaydet (Commit)
d3a345a2
authored
Ara 10, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.2
üst
10a6ddb0
964561bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
test_subprocess.py
Lib/test/test_subprocess.py
+17
-11
No files found.
Lib/test/test_subprocess.py
Dosyayı görüntüle @
d3a345a2
...
@@ -18,6 +18,12 @@ try:
...
@@ -18,6 +18,12 @@ try:
except
ImportError
:
except
ImportError
:
gc
=
None
gc
=
None
try
:
import
resource
except
ImportError
:
resource
=
None
mswindows
=
(
sys
.
platform
==
"win32"
)
mswindows
=
(
sys
.
platform
==
"win32"
)
#
#
...
@@ -824,12 +830,12 @@ class _SuppressCoreFiles(object):
...
@@ -824,12 +830,12 @@ class _SuppressCoreFiles(object):
def
__enter__
(
self
):
def
__enter__
(
self
):
"""Try to save previous ulimit, then set it to (0, 0)."""
"""Try to save previous ulimit, then set it to (0, 0)."""
try
:
if
resource
is
not
None
:
import
resource
try
:
self
.
old_limit
=
resource
.
getrlimit
(
resource
.
RLIMIT_CORE
)
self
.
old_limit
=
resource
.
getrlimit
(
resource
.
RLIMIT_CORE
)
resource
.
setrlimit
(
resource
.
RLIMIT_CORE
,
(
0
,
0
))
resource
.
setrlimit
(
resource
.
RLIMIT_CORE
,
(
0
,
0
))
except
(
ImportError
,
ValueError
,
resource
.
error
):
except
(
ValueError
,
resource
.
error
):
pass
pass
if
sys
.
platform
==
'darwin'
:
if
sys
.
platform
==
'darwin'
:
# Check if the 'Crash Reporter' on OSX was configured
# Check if the 'Crash Reporter' on OSX was configured
...
@@ -850,11 +856,11 @@ class _SuppressCoreFiles(object):
...
@@ -850,11 +856,11 @@ class _SuppressCoreFiles(object):
"""Return core file behavior to default."""
"""Return core file behavior to default."""
if
self
.
old_limit
is
None
:
if
self
.
old_limit
is
None
:
return
return
try
:
if
resource
is
not
None
:
import
resource
try
:
resource
.
setrlimit
(
resource
.
RLIMIT_CORE
,
self
.
old_limit
)
resource
.
setrlimit
(
resource
.
RLIMIT_CORE
,
self
.
old_limit
)
except
(
ImportError
,
ValueError
,
resource
.
error
):
except
(
ValueError
,
resource
.
error
):
pass
pass
@unittest.skipIf
(
mswindows
,
"POSIX specific tests"
)
@unittest.skipIf
(
mswindows
,
"POSIX specific tests"
)
...
...
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