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
c68a4a04
Kaydet (Commit)
c68a4a04
authored
Ock 18, 2013
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check windows fd validity (closes #16992)
üst
fc4aa76d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
test_signal.py
Lib/test/test_signal.py
+9
-2
NEWS
Misc/NEWS
+3
-0
signalmodule.c
Modules/signalmodule.c
+1
-1
No files found.
Lib/test/test_signal.py
Dosyayı görüntüle @
c68a4a04
...
...
@@ -222,6 +222,13 @@ class WindowsSignalTests(unittest.TestCase):
signal
.
signal
(
7
,
handler
)
class
WakeupFDTests
(
unittest
.
TestCase
):
def
test_invalid_fd
(
self
):
fd
=
support
.
make_bad_fd
()
self
.
assertRaises
(
ValueError
,
signal
.
set_wakeup_fd
,
fd
)
@unittest.skipIf
(
sys
.
platform
==
"win32"
,
"Not valid on Windows"
)
class
WakeupSignalTests
(
unittest
.
TestCase
):
def
check_wakeup
(
self
,
test_body
,
*
signals
,
ordered
=
True
):
...
...
@@ -864,8 +871,8 @@ class PendingSignalsTests(unittest.TestCase):
def
test_main
():
try
:
support
.
run_unittest
(
PosixTests
,
InterProcessSignalTests
,
Wakeup
SignalTests
,
SiginterruptTest
,
ItimerTest
,
WindowsSignalTests
,
Wakeup
FDTests
,
WakeupSignalTests
,
SiginterruptTest
,
ItimerTest
,
WindowsSignalTests
,
PendingSignalsTests
)
finally
:
support
.
reap_children
()
...
...
Misc/NEWS
Dosyayı görüntüle @
c68a4a04
...
...
@@ -150,6 +150,9 @@ Core and Builtins
Library
-------
-
Issue
#
16992
:
On
Windows
in
signal
.
set_wakeup_fd
,
validate
the
file
descriptor
argument
.
-
Issue
#
16422
:
For
compatibility
with
the
Python
version
,
the
C
version
of
decimal
now
uses
strings
instead
of
integers
for
rounding
mode
constants
.
...
...
Modules/signalmodule.c
Dosyayı görüntüle @
c68a4a04
...
...
@@ -427,7 +427,7 @@ signal_set_wakeup_fd(PyObject *self, PyObject *args)
return
NULL
;
}
#endif
if
(
fd
!=
-
1
&&
fstat
(
fd
,
&
buf
)
!=
0
)
{
if
(
fd
!=
-
1
&&
(
!
_PyVerify_fd
(
fd
)
||
fstat
(
fd
,
&
buf
)
!=
0
)
)
{
PyErr_SetString
(
PyExc_ValueError
,
"invalid fd"
);
return
NULL
;
}
...
...
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