Open
Description
posixmodule
ignores signals in os_openpty_impl
and os_grantpt_impl
by wrapping them in two PyOS_setsig calls:
sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL);
...
PyOS_setsig(SIGCHLD, sig_saved);
This relies on the GIL being held, so it probably needs a dedicated lock in free-threading builds.