[PATCH] Add gdb remote protocol handling to strace
Dmitry V. Levin
ldv at altlinux.org
Thu Nov 2 03:38:39 UTC 2017
On Tue, Oct 17, 2017 at 02:29:31PM -0400, Stan Cox wrote:
> + /* Make sure SIGCHLD has the default action so that waitpid
> + definitely works without losing track of children. The user
> + should not have given us a bogus state to inherit, but he might
> + have. Arguably we should detect SIG_IGN here and pass it on
> + to children, but probably noone really needs that. */
> + signal(SIGCHLD, SIG_DFL);
Why do you ever need this change?
It essentially reverts the key part of commit v4.17-8-ge97a66f:
Do not reset SIGCHLD handler in tracees to SIG_DFL
While strace resets SIGCHLD handler to the default action so that
waitpid definitely works without losing track of children, tracees
should not inherit this change.
* strace.c (struct exec_params): Add child_sa field.
(init): When setting SIGCHLD handler to SIG_DFL, save the old handler.
(exec_or_die): Restore SIGCHLD handler if it was different from SIG_DFL
* NEWS: Mention this change.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: not available
More information about the Strace-devel