|
@@ -183,8 +183,10 @@ static void test_ptrace_syscall_restart(void)
|
|
if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0)
|
|
if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0)
|
|
err(1, "PTRACE_TRACEME");
|
|
err(1, "PTRACE_TRACEME");
|
|
|
|
|
|
|
|
+ pid_t pid = getpid(), tid = syscall(SYS_gettid);
|
|
|
|
+
|
|
printf("\tChild will make one syscall\n");
|
|
printf("\tChild will make one syscall\n");
|
|
- raise(SIGSTOP);
|
|
|
|
|
|
+ syscall(SYS_tgkill, pid, tid, SIGSTOP);
|
|
|
|
|
|
syscall(SYS_gettid, 10, 11, 12, 13, 14, 15);
|
|
syscall(SYS_gettid, 10, 11, 12, 13, 14, 15);
|
|
_exit(0);
|
|
_exit(0);
|
|
@@ -301,9 +303,11 @@ static void test_restart_under_ptrace(void)
|
|
if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0)
|
|
if (ptrace(PTRACE_TRACEME, 0, 0, 0) != 0)
|
|
err(1, "PTRACE_TRACEME");
|
|
err(1, "PTRACE_TRACEME");
|
|
|
|
|
|
|
|
+ pid_t pid = getpid(), tid = syscall(SYS_gettid);
|
|
|
|
+
|
|
printf("\tChild will take a nap until signaled\n");
|
|
printf("\tChild will take a nap until signaled\n");
|
|
setsigign(SIGUSR1, SA_RESTART);
|
|
setsigign(SIGUSR1, SA_RESTART);
|
|
- raise(SIGSTOP);
|
|
|
|
|
|
+ syscall(SYS_tgkill, pid, tid, SIGSTOP);
|
|
|
|
|
|
syscall(SYS_pause, 0, 0, 0, 0, 0, 0);
|
|
syscall(SYS_pause, 0, 0, 0, 0, 0, 0);
|
|
_exit(0);
|
|
_exit(0);
|