Without this, early ptrace stops can be missed because they can happen
before the call to uloop_init().
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
return -1;
}
+ /* Initialize uloop to catch all ptrace stops from now on. */
+ uloop_init();
+
int ptrace_options = PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK | PTRACE_O_TRACECLONE;
switch (mode) {
case UTRACE:
return -1;
}
- uloop_init();
tracer.proc.pid = child;
tracer.proc.cb = tracer_cb;
uloop_process_add(&tracer.proc);