There's a race in ratrace. If started with a -c, the child must first
set hang on itself. But wait! There's more! Before the parent restarts the child, it should
set nohang on it -- nohang is inherited across exec and, since we're already tracing the child,
nohang causes real trouble when the child forks.
So, summary: child of -c command sets hang, and parent is careful to clear it.
Sadly, however, this makes it hard for some reason for ratrace to trace ratrace :-(
something more is still needed. This change is tested on x86 but not ARM yet.
|