[Ups-cvs] ups/ups ao_ptrace.c,1.10,1.11
Brought to you by:
ianedwards
From: Tom H. <th...@us...> - 2006-06-21 16:34:41
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26962 Modified Files: ao_ptrace.c Log Message: Backout accidental commit. Index: ao_ptrace.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ao_ptrace.c 21 Jun 2006 16:25:27 -0000 1.10 --- ao_ptrace.c 21 Jun 2006 16:34:37 -0000 1.11 *************** *** 441,454 **** - static void - abort_cleanup(int signo) - { - target_t *xp = get_current_target(); - iproc_t *ip = GET_IPROC(xp); - - kill(ip->ip_pid, SIGTRAP); - } - - /* Kill off the target process */ --- 441,444 ---- *************** *** 457,461 **** target_t *xp; { - struct sigaction sa; wait_arg_t status; iproc_t *ip; --- 447,450 ---- *************** *** 464,492 **** uninstall_all_breakpoints(xp); ! ! sa.sa_handler = abort_cleanup; ! sigemptyset(&sa.sa_mask); ! sa.sa_flags = SA_ONESHOT; ! sa.sa_restorer = NULL; ! ! sigaction(SIGALRM, &sa, &sa); ! ! alarm(5); ! ! std_ptrace(PTRACE_CONT, ip->ip_pid, (char *)NULL, SIGTERM); ptrace_wait_for_target(xp); ! while (ip->ip_stopres == SR_SIG) { ! std_ptrace(PTRACE_CONT, ip->ip_pid, (char *)NULL, ip->ip_lastsig); ! ptrace_wait_for_target(xp); ! } ! ! alarm(0); ! ! sigaction(SIGALRM, &sa, NULL); if (ip->ip_stopres != SR_DIED) { - std_ptrace(PTRACE_KILL, ip->ip_pid, (char *)NULL, 0); - if (ip->ip_attached) { /* wait() hangs on a PTRACE_ATTACH process which --- 453,462 ---- uninstall_all_breakpoints(xp); ! std_ptrace(PTRACE_SINGLESTEP, ip->ip_pid, (char *)NULL, SIGTERM); ptrace_wait_for_target(xp); ! std_ptrace(PTRACE_KILL, ip->ip_pid, (char *)NULL, 0); if (ip->ip_stopres != SR_DIED) { if (ip->ip_attached) { /* wait() hangs on a PTRACE_ATTACH process which |