mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
bpo-35568: add 'raise_signal' function (GH-11335)
As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
This commit is contained in:
parent
e61cc481e0
commit
c24c6c2c93
10 changed files with 122 additions and 47 deletions
|
|
@ -1596,8 +1596,8 @@ class TestPosixSpawn(unittest.TestCase):
|
|||
'need signal.pthread_sigmask()')
|
||||
def test_setsigmask(self):
|
||||
code = textwrap.dedent("""\
|
||||
import _testcapi, signal
|
||||
_testcapi.raise_signal(signal.SIGUSR1)""")
|
||||
import signal
|
||||
signal.raise_signal(signal.SIGUSR1)""")
|
||||
|
||||
pid = posix.posix_spawn(
|
||||
sys.executable,
|
||||
|
|
@ -1627,8 +1627,8 @@ class TestPosixSpawn(unittest.TestCase):
|
|||
def test_setsigdef(self):
|
||||
original_handler = signal.signal(signal.SIGUSR1, signal.SIG_IGN)
|
||||
code = textwrap.dedent("""\
|
||||
import _testcapi, signal
|
||||
_testcapi.raise_signal(signal.SIGUSR1)""")
|
||||
import signal
|
||||
signal.raise_signal(signal.SIGUSR1)""")
|
||||
try:
|
||||
pid = posix.posix_spawn(
|
||||
sys.executable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue