You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has been noted at #14636 that sage's handling of the SIGCHLD signal is prone to breakage. To doctest whether things are correct, Jeroen Demeyer proposed to add the following to sage/tests/interrupt.pyx:
"""
Show that `SIGCHLD` is completely ignored by default. If the process
`p` finishes, there should be no `SIGCHLD` signal, so ``select()`` will
simply time out::
sage: from select import select
sage: import subprocess
sage: p = subprocess.Popen(["sleep", "1"]) # long time
sage: select([], [], [], 1.5) # long time
([], [], [])
sage: p.poll() # long time
0
We now do the same but after installing a dummy `SIGCHLD`
handler::
sage: import signal
sage: def dummy_handler(a,b):
....: pass
sage: signal.signal(signal.SIGCHLD, dummy_handler) # random
sage: p = subprocess.Popen(["sleep", "1"]) # long time
sage: select([], [], [], 1.5) # long time
Traceback (most recent call last):
...
error: (4, 'Interrupted system call')
sage: p.poll() # long time
0
Reset the `SIGCHLD` handler::
sage: signal.signal(signal.SIGCHLD, signal.SIG_IGN) # random
"""
It has been noted at #14636 that sage's handling of the SIGCHLD signal is prone to breakage. To doctest whether things are correct, Jeroen Demeyer proposed to add the following to sage/tests/interrupt.pyx:
Component: doctest coverage
Issue created by migration from https://trac.sagemath.org/ticket/14639
The text was updated successfully, but these errors were encountered: