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
f44ce874
Kaydet (Commit)
f44ce874
authored
May 03, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8407: disable faulthandler timeout thread on all platforms
The problem is not specific to Mac OS X.
üst
441f9352
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
test_signal.py
Lib/test/test_signal.py
+13
-14
No files found.
Lib/test/test_signal.py
Dosyayı görüntüle @
f44ce874
...
...
@@ -494,6 +494,7 @@ class PthreadSigmaskTests(unittest.TestCase):
self
.
assertRaises
(
RuntimeError
,
signal
.
pthread_sigmask
,
1700
,
[])
def
test_block_unlock
(
self
):
import
faulthandler
pid
=
os
.
getpid
()
signum
=
signal
.
SIGUSR1
...
...
@@ -503,20 +504,18 @@ class PthreadSigmaskTests(unittest.TestCase):
def
read_sigmask
():
return
signal
.
pthread_sigmask
(
signal
.
SIG_BLOCK
,
[])
if
sys
.
platform
==
"darwin"
:
import
faulthandler
# The fault handler timeout thread masks all signals. If the main
# thread masks also SIGUSR1, all threads mask this signal. In this
# case, on Mac OS X, if we send SIGUSR1 to the process, the signal
# is pending in the main or the faulthandler timeout thread.
# Unblock SIGUSR1 in the main thread calls the signal handler only
# if the signal is pending for the main thread.
#
# Stop the faulthandler timeout thread to workaround this problem.
# Another solution would be to send the signal directly to the main
# thread using pthread_kill(), but Python doesn't expose this
# function.
faulthandler
.
cancel_dump_tracebacks_later
()
# The fault handler timeout thread masks all signals. If the main
# thread masks also SIGUSR1, all threads mask this signal. In this
# case, if we send SIGUSR1 to the process, the signal is pending in the
# main or the faulthandler timeout thread. Unblock SIGUSR1 in the main
# thread calls the signal handler only if the signal is pending for the
# main thread.
#
# Stop the faulthandler timeout thread to workaround this problem.
# Another solution would be to send the signal directly to the main
# thread using pthread_kill(), but Python doesn't expose this
# function.
faulthandler
.
cancel_dump_tracebacks_later
()
# Install our signal handler
old_handler
=
signal
.
signal
(
signum
,
handler
)
...
...
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