runner: install the SIGTSTP handler on the runner only
Currently, the signal handler for SIGTSTP (which implements the test
pause/resume) is installed before the test process is created, and
thus, is inherited by it.
There's a clean up of the signal handler in the test process, but this
clean up can be prevented by installing the signal handler on the test
runner alone (after the test process is created).
The ramifications of this proposal are such that, in the chance that a
SIGTSTP is received after the test process is created and before the
signal handler is installed in the test runner process, nothing will
happen. In contrast, the current approach may have the signal handler
action being executed, and attempting to send SIGSTOP or SIGCONT to
the test process, but not doing so because there's no test process
yet.
In the end, it seems that the two approaches are pretty safe, and the
biggest benefit here is that the test process never has the handler
installed.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录