[PATCH] Re: PTRACE_EVENT_CLONE patch causing deadlock?
Ulrich Weigand
weigand@i1.informatik.uni-erlangen.de
Thu Jul 29 18:34:00 GMT 2004
Daniel Jacobowitz wrote:
> Probably it's never been tested. Resuming the parent seems right to
> me - see lin_lwp_handle_extended. Does just adding a PTRACE_CONT in
> there work?
Indeed, the following patch fixes the deadlock.
Tested on s390-ibm-linux and s390x-ibm-linux.
OK?
ChangeLog:
* lin-lwp.c (child_wait): Continue inferior after processing
PTRACE_EVENT_CLONE event.
Index: gdb/lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.56
diff -c -p -r1.56 lin-lwp.c
*** gdb/lin-lwp.c 26 Jul 2004 14:53:02 -0000 1.56
--- gdb/lin-lwp.c 29 Jul 2004 13:16:34 -0000
*************** child_wait (ptid_t ptid, struct target_w
*** 1213,1218 ****
--- 1213,1219 ----
{
ptrace (PTRACE_DETACH, ourstatus->value.related_pid, 0, 0);
ourstatus->kind = TARGET_WAITKIND_IGNORE;
+ ptrace (PTRACE_CONT, pid, 0, 0);
pid = -1;
save_errno = EINTR;
}
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gdb-patches
mailing list